/rails-sample

Code for learning Ruby on Rails

Primary LanguageRuby

Rails Sample

Code for learning Ruby on Rails.
Followed the instruction here.

Setup

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

Install modules

bundle install --path vendor/bundle

Database migration

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

Launch server by

bundle exec rails s