Ruby on Rails `method_missing': undefined method `active_record' -


i keep having following error message when run rails server on newly created rails project. created running command rails new toy_app.

please guide me how can solve problem. have rails project , run rails server . not possible in new project.

error message

/library/ruby/gems/2.0.0/gems/railties-4.2.2/lib/rails/railtie/configuration.rb:95:in `method_missing': undefined method `active_record' #<rails::application::configuration:0x007f9413116e40> (nomethoderror)   /users/judobear/toy_app/config/application.rb:24:in `<class:application>'   /users/judobear/toy_app/config/application.rb:10:in `<module:toyapp>'   /users/judobear/toy_app/config/application.rb:9:in `<top (required)>'  /library/ruby/gems/2.0.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:78:in `require'   /library/ruby/gems/2.0.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:78:in `block in server'   /library/ruby/gems/2.0.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:75:in `tap'   /library/ruby/gems/2.0.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:75:in `server'  /library/ruby/gems/2.0.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:39:in `run_command!'  /library/ruby/gems/2.0.0/gems/railties-4.2.2/lib/rails/commands.rb:17:in `<top (required)>'  /users/judobear/toy_app/bin/rails:8:in `require'   /users/judobear/toy_app/bin/rails:8:in `<top (required)>'  /library/ruby/gems/2.0.0/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `load'  /library/ruby/gems/2.0.0/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in `call'  /library/ruby/gems/2.0.0/gems/spring-1.1.3/lib/spring/client/command.rb:7:in `call'  /library/ruby/gems/2.0.0/gems/spring-1.1.3/lib/spring/client.rb:26:in `run'   /library/ruby/gems/2.0.0/gems/spring-1.1.3/bin/spring:48:in `<top (required)>'  /library/ruby/gems/2.0.0/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `load'  /library/ruby/gems/2.0.0/gems/spring-1.1.3/lib/spring/binstub.rb:11:in `<top (required)>'  /system/library/frameworks/ruby.framework/versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'   /system/library/frameworks/ruby.framework/versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'   /users/judobear/toy_app/bin/spring:13:in `<top (required)>'  bin/rails:3:in `load'  bin/rails:3:in `<main>' 

gemfile

source 'https://rubygems.org'  gem 'rails',        '4.2.2' gem 'sass-rails',   '5.0.2' gem 'uglifier',     '2.5.3' gem 'coffee-rails', '4.1.0' gem 'jquery-rails', '4.0.3' gem 'turbolinks',   '2.3.0' gem 'jbuilder',     '2.2.3' gem 'sdoc',         '0.4.0', group: :doc  group :development, :test   gem 'sqlite3',     '1.3.9'   gem 'byebug',      '3.4.0'   gem 'web-console', '2.0.0.beta3'   gem 'spring',      '1.1.3' end  group :production   gem 'pg',             '0.17.1'   gem 'rails_12factor', '0.0.2' end 

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 toyapp   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 

after having same issue myself, user chased down bug 6.0.1 version of arel gem, raised yesterday , subsequently fixed:

rails 4.2.3 `method_missing': undefined method `active_record'

if run "bundle update" today , carry on, app should fine.

hth.


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -