##Install Ruby on Rails
Refer to this tutorial: Install Rails on Ubuntu
Here’s how to create a project-specific gemset, installing Rails, and creating a new application.
$ rvm use ruby-2.1.2@myapp --ruby-version --create
$ gem install rails
$ rails new .
The following code shows how to scaffold for a simple entity called "post" with two attributes:
- title of type string
- body of type text
$ rails generate scaffold post title:string body:text
To propagate the effect of the scaffold to the database use the follow command:
$ rake db:migrate
To show the routes handled by the application (also this part is generated by the scaffold mechanism) use the command:
$ rake routes