Rails 3.0.9: config.active_record not found
I have upgraded from Rails 3.0.7 to Rails 3.0.9 and I am now getting the following error in my config/application.rb:
/Library/Ruby/Gems/1.8/gems/railties-3.1.0/lib/rails/railtie/configuration.rb:78:in `method_missing': undefined method `active_record' for #<Rails::Application::Configuration:0x10107a830> (NoMethodError)
from /Users/mathias/ruby/myapp/config/application.rb:47
On line 47 of application.rb I have
config.active_record.schema_format = :sql
It seems that
config.active_record
is not found in Rails 3.0.9 where this worked in 3.0.7. This is regardless of which method I call on config.active_record. When I comment out 开发者_JAVA百科any usage of config.active_record, the same occurs with config.active_mailer.
And I do a require "rails/all"
in the application.rb
Any help appreciated.
Got this to work with 3.1.0 through the steps outlined here. The key bit that made most of my problems disappear was to change boot.rb
to
require 'rubygems'
# Set up gems listed in the Gemfile.
ENV['BUNDLE_GEMFILE'] = File.expand_path('../../Gemfile', __FILE__)
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']
精彩评论