0

私は実行しようとしています

rails server

新しい開発環境 (OS X) で初めて、次のエラーが発生します。

=> Booting WEBrick
=> Rails 4.0.0 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
Exiting
/Users/me/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/railtie/configuration.rb:95:in `method_missing': undefined method `action_mailer' for #<Rails::Application::Configuration:0x007fe4fe066c70> (NoMethodError)
from /Users/me/Me/rails_projects/first_app/config/environments/development.rb:17:in `block in <top (required)>'
from /Users/me/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:24:in `class_eval'
from /Users/me/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:24:in `configure'
from /Users/me/Me/rails_projects/first_app/config/environments/development.rb:1:in `<top (required)>'
from /Users/me/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
from /Users/me/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
from /Users/me/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
from /Users/me/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
from /Users/me/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/engine.rb:591:in `block (2 levels) in <class:Engine>'
from /Users/me/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/engine.rb:590:in `each'
from /Users/me/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/engine.rb:590:in `block in <class:Engine>'
from /Users/me/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/me/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `run'
from /Users/me/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/me/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
from /Users/me/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from /Users/me/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:210:in `block (2 levels) in each_strongly_connected_component_from'
from /Users/me/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
from /Users/me/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:209:in `block in each_strongly_connected_component_from'
from /Users/me/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/initializable.rb:44:in `each'
from /Users/me/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/initializable.rb:44:in `tsort_each_child'
from /Users/me/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:203:in `each_strongly_connected_component_from'
from /Users/me/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
from /Users/me/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:180:in `each'
from /Users/me/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
from /Users/me/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
from /Users/me/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/me/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/application.rb:215:in `initialize!'
from /Users/me/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/me/Me/rails_projects/first_app/config/environment.rb:5:in `<top (required)>'
from /Users/me/Me/rails_projects/first_app/config.ru:3:in `require'
from /Users/me/Me/rails_projects/first_app/config.ru:3:in `block in <main>'
from /Users/me/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
from /Users/me/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
from /Users/me/Me/rails_projects/first_app/config.ru:in `new'
from /Users/me/Me/rails_projects/first_app/config.ru:in `<main>'
from /Users/me/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
from /Users/me/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
from /Users/me/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
from /Users/me/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
from /Users/me/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
from /Users/me/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/commands/server.rb:48:in `app'
from /Users/me/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
from /Users/me/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/commands/server.rb:75:in `start'
from /Users/me/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/commands.rb:78:in `block in <top (required)>'
from /Users/me/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/commands.rb:73:in `tap'
from /Users/me/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/commands.rb:73:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'

どんな助けでも大歓迎です、ありがとう!

source 'https://rubygems.org'
ruby '2.0.0'
#ruby-gemset=railstutorial_rails_4_0

group :development do
  gem 'sqlite3', '1.3.7'
end

gem 'sass-rails', '4.0.0'
gem 'uglifier', '2.1.1'
gem 'coffee-rails', '4.0.0'
gem 'jquery-rails', '2.2.1'
gem 'turbolinks', '1.1.1'
gem 'jbuilder', '1.0.2'

group :doc do
  gem 'sdoc', '0.3.20', require: false
end

# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# Use unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano', group: :development

# Use debugger
# gem 'debugger', group: [:development, :test]
4

1 に答える 1

0

application.rb の次の行にコメントを付けます

# require 'active_resource/railtie'

Rails 4 では不要になりました。

それでも、gemを使用して使用できます

于 2013-11-12T19:08:55.483 に答える