Dear Friends
A simple tutorial that can be used to install Ruby on Rails Framework on Mac Sierra.
So we are going to follow below steps
- Installing Homebrew
- Installing Ruby
- Installing Rails
- Installing sqlite3 [ default ]
Installing Homebrew
Homebrew is a required tool . It allow us to install and compile source packages from source. It comes with a very simple install script. It might ask to install XCode CommandLine Tools, if your mac is not having them.
Write in terminal
1 |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" |
So now your Homebrew is installed now we proceed with other steps.
Installing Ruby
2.4.0 (Recommended)
1 2 3 4 5 6 7 8 9 10 |
brew install rbenv ruby-build # Add rbenv to bash so that it loads every time you open a terminal echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile source ~/.bash_profile # Install Ruby rbenv install <span class="ruby-version">2.4.0</span> rbenv global <span class="ruby-version">2.4.0</span> ruby -v |
Installing ROR [ Ruby on Rails] framework
Recommended 5.0.1
write below command in your terminal
1 |
gem install rails -v <span class="rails-version">5.0.1</span> |
Rails is now installed. To use rails within your mac you need to reintiallize it.
rbenv rehash
Please check if rails is installed in system.
rails -v
Setting up a database
1 |
brew install sqlite3 |
sqlite3 is default db.
Thanks for reading.
With due respect to used Reference
SHARE THIS PAGE!