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 ]
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
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
So now your Homebrew is installed now we proceed with other steps.
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
# Install Ruby
rbenv install <span class="ruby-version">2.4.0</span>
rbenv global <span class="ruby-version">2.4.0</span>
Installing ROR [ Ruby on Rails] framework
write below command in your terminal
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.
Please check if rails is installed in system.
Setting up a database
brew install sqlite3
sqlite3 is default db.
Thanks for reading.
With due respect to used Reference