RailsCasts Pro episodes are now free!

Learn more or hide this

Jamie Gaskins's Profile

GitHub User: jgaskins

Site: http://jgaskins.org/

Comments by Jamie Gaskins

Avatar

If you're not using ActiveRecord or you're skipping some other default Rails module, there's another gotcha in application.rb. For example, you can cherry-pick which modules you want to use by requiring them explicitly:

ruby
require "action_controller/railtie"
require "action_mailer/railtie"
require "active_resource/railtie"

If the top of your application.rb doesn't say require rails/all, make sure you add this line:

ruby
require "sprockets/railtie"