ruby - Rails 4.2.3 `method_missing': undefined method `active_record' -
i tried create new rails app today, , app behaving though activerecord isn't there.
i created app with:
rails new myapp --database=mysql
when running rake db:create, get:
rake aborted! nomethoderror: undefined method `active_record' #<rails::application::configuration:0x007faad08b3058> /library/ruby/gems/2.0.0/gems/railties-4.2.3/lib/rails/railtie/configuration.rb:95:in `method_missing' /users/richard/dropbox/development/myapp/config/application.rb:24:in `<class:application>' /users/richard/dropbox/development/myapp/config/application.rb:10:in `<module:myapp>' /users/richard/dropbox/development/myapp/config/application.rb:9:in `<top (required)>' /users/richard/dropbox/development/myapp/rakefile:4:in `<top (required)>' (see full trace running task --trace)
in fact, if comment out offending line , run rake -t:
... rake cache_digests:dependencies # lookup first-level dependencies template (like messages/show or comments/_c... rake cache_digests:nested_dependencies # lookup nested dependencies template (like messages/show or comments/_commen... rake doc:app # generate docs app -- available doc:rails, doc:guides (options: tem... rake log:clear # truncates *.log files in log/ 0 bytes (specify logs logs=t... rake middleware ...
there no rake db:* tasks @ all!
i have bunch of other rails apps ranging rails 3.x rails 4.2.0 , work fine. it's app, created today (and new app) showing behaviour.
running osx 10.10, ruby 2.0.0, stock gemfile.
application.rb:
require file.expand_path('../boot', __file__) require 'rails/all' # require gems listed in gemfile, including gems # you've limited :test, :development, or :production. bundler.require(*rails.groups) module myapp class application < rails::application # settings in config/environments/* take precedence on specified here. # application configuration should go files in config/initializers # -- .rb files in directory automatically loaded. # set time.zone default specified zone , make active record auto-convert zone. # run "rake -d time" list of tasks finding time zone names. default utc. # config.time_zone = 'central time (us & canada)' # default locale :en , translations config/locales/*.rb,yml auto loaded. # config.i18n.load_path += dir[rails.root.join('my', 'locales', '*.{rb,yml}').to_s] # config.i18n.default_locale = :de # not swallow errors in after_commit/after_rollback callbacks. config.active_record.raise_in_transactional_callbacks = true end end
the 6.0.1 version of arel gem appears cause issue, updated yesterday on 7/10/15. https://rubygems.org/gems/arel/versions/6.0.1
== update ==
the author addressed issue morning 6.0.2. https://github.com/rails/arel/issues/375
run:
bundle update
Comments
Post a Comment