RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: jgaskins
Site: http://jgaskins.org/
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:
application.rb
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:
require rails/all
require "sprockets/railtie"
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:If the top of your
application.rb
doesn't sayrequire rails/all
, make sure you add this line:require "sprockets/railtie"