Rails simple handy commands — in progress

I am adding a few handy Rails commands that I use on a regular. This avoids me to go to google search

Generate rails app with a specific version

rails _VERSION_ new YOURAPPNAME
rails _4.0.8_ new sample_app

To skip unit test

rails new sample_app --skip-test-unit

Rails generate model

rails g model Book name:string:index isbn:string:uniq description:text user:references content:string{30}

This generates:

https://gist.github.com/dv2/11be9082c10c51a8c42f
rails g model Book name:string:index description:text ‘cost:decimal{5,2}’

This generates

https://gist.github.com/dv2/d485a40e2097acdef36d

Data types:
integer
string
datetime

Find where a bundled gem is installed

bundle show [gemname]
bundle show sass-rails
==> /Users/user_name/.rvm/gems/ruby-2.1.2/gems/sass-rails-4.0.3
Show your support

Clapping shows how much you appreciated dv’s story.