Code for learning Ruby on Rails.
Followed the instruction here.
Install version management tool if not installed.
brew install rbenv
Find available versions.
rbenv install -l
Install the latest version.
rbenv install 2.4.1
Set the version to the project directory.
rbenv local 2.4.1
Install bundler
by
gem install bundler
bundle install --path vendor/bundle
Migrate database by
bundle exec rake db:migrate
By putting bundle exec
, the subsequent command refers to locally installed gems.
Create seed records written in db/seeds.rb by
bundle exec rake db:seed
Launch server by
bundle exec rails s