Rails tricks
(Mac only) When trying to execute “$ bundle install” and the next error occurs: “can’t find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h” you must install “Command Line Tools of Xcode”.
Use $ bundle exec \ to execute any command (like rake) using the gems defined in the Gemfile of your project.
Every thing os generated with:
can be undone with:
$ rale db:migrate it’s undone with $ rake db:rollback
$ rails generate controller PageController method1 method2 to generate static pages
scss - sass app/assets/stylesheets/
rake db:reset # empty db and reload migrations