2013-09-19 1 views
2

Привет я использую Spork камень для загрузки данных, необходимых для выполнения тестов, но я получаю следующее сообщение об ошибке при загрузке Sporkнеинициализированным постоянная ActionMailer (NameError) с Spork

Using RSpec, 
Loading Spork.prefork block... 
uninitialized constant ActionMailer (NameError) 
/home/apellizz/.rvm/gems/[email protected]_sites/gems/activesupport-3.2.14/lib/active_support/inflector/methods.rb:230:in 'block in constantize' 
/home/apellizz/.rvm/gems/[email protected]_sites/gems/activesupport-3.2.14/lib/active_support/inflector/methods.rb:229:in 'each' 
/home/apellizz/.rvm/gems/[email protected]_sites/gems/activesupport-3.2.14/lib/active_support/inflector/methods.rb:229:in 'constantize' 
/home/apellizz/.rvm/gems/[email protected]_sites/gems/activesupport-3.2.14/lib/active_support/core_ext/string/inflections.rb:54:in 'constantize' 
/home/apellizz/.rvm/gems/[email protected]_sites/gems/devise-3.0.3/app/mailers/devise/mailer.rb:1:in '<top (required)>' 
/home/apellizz/.rvm/gems/[email protected]_sites/gems/railties-3.2.14/lib/rails/engine.rb:444:in 'block (2 levels) in eager_load!' 
/home/apellizz/.rvm/gems/[email protected]_sites/gems/railties-3.2.14/lib/rails/engine.rb:443:in 'each' 
/home/apellizz/.rvm/gems/[email protected]_sites/gems/railties-3.2.14/lib/rails/engine.rb:443:in 'block in eager_load!' 
/home/apellizz/.rvm/gems/[email protected]_sites/gems/railties-3.2.14/lib/rails/engine.rb:441:in 'each' 
/home/apellizz/.rvm/gems/[email protected]_sites/gems/railties-3.2.14/lib/rails/engine.rb:441:in 'eager_load!' 
/home/apellizz/Scrivania/ruby_sites/spec/spec_helper.rb:19:in 'block (2 levels) in <top (required)>' 
/home/apellizz/.rvm/gems/[email protected]_sites/gems/railties-3.2.14/lib/rails/application/railties.rb:8:in 'each' 
/home/apellizz/.rvm/gems/[email protected]_sites/gems/railties-3.2.14/lib/rails/application/railties.rb:8:in 'all' 
/home/apellizz/Scrivania/ruby_sites/spec/spec_helper.rb:19:in 'block in <top (required)>' 
/home/apellizz/.rvm/gems/[email protected]_sites/gems/spork-1.0.0rc3/lib/spork.rb:24:in 'prefork' 
/home/apellizz/Scrivania/ruby_sites/spec/spec_helper.rb:5:in '<top (required)>' 
/home/apellizz/.rvm/gems/[email protected]_sites/gems/spork-1.0.0rc3/lib/spork/test_framework.rb:138:in 'load' 
/home/apellizz/.rvm/gems/[email protected]_sites/gems/spork-1.0.0rc3/lib/spork/test_framework.rb:138:in 'block (2 levels) in preload' 
/home/apellizz/.rvm/gems/[email protected]_sites/gems/spork-1.0.0rc3/lib/spork/app_framework.rb:49:in 'preload' 
/home/apellizz/.rvm/gems/ruby-1.9[email protected]_sites/gems/spork-1.0.0rc3/lib/spork/test_framework.rb:134:in 'block in preload' 
/home/apellizz/.rvm/gems/[email protected]_sites/gems/spork-1.0.0rc3/lib/spork.rb:62:in 'exec_prefork' 
/home/apellizz/.rvm/gems/[email protected]_sites/gems/spork-1.0.0rc3/lib/spork/test_framework.rb:120:in 'preload' 
/home/apellizz/.rvm/gems/[email protected]_sites/gems/spork-1.0.0rc3/lib/spork/run_strategy/forking.rb:25:in 'preload' 
/home/apellizz/.rvm/gems/[email protected]_sites/gems/spork-1.0.0rc3/lib/spork/runner.rb:74:in 'run' 
/home/apellizz/.rvm/gems/[email protected]_sites/gems/spork-1.0.0rc3/lib/spork/runner.rb:10:in 'run' 
/home/apellizz/.rvm/gems/[email protected]_sites/gems/spork-1.0.0rc3/bin/spork:10:in '<top (required)>' 
/home/apellizz/.rvm/gems/[email protected]_sites/bin/spork:23:in 'load' 
/home/apellizz/.rvm/gems/[email protected]_sites/bin/spork:23:in '<main>' 
/home/apellizz/.rvm/gems/[email protected]_sites/bin/ruby_noexec_wrapper:14:in 'eval' 
/home/apellizz/.rvm/gems/[email protected]_sites/bin/ruby_noexec_wrapper:14:in '<main>' 

линия, которая АНОМАЛЬНОЙ ошибка

Rails.application.railties.all { |r| r.eager_load! } 

Как я могу это решить? Или, по крайней мере, создание spork, не загружающее ActionMailer railtie?

Подробнее:

Я не забочусь о новых сообщениях в настоящее время

Я использую изобрести

Моей папки приложения/мэйлера пуст

+0

Вы нашли решение? –

ответ

1

Я нашел решение: я не включил rails/actionmailer в моей config/application.rb. Это решило проблему.