Я выполнил обновление с Rails 3.0.10 до 3.1.1, следуя этим инструкциям , и смог успешно запустить сервер rails с rails s
, но столкнулся с ошибкой, как только я использовал RAILS_ENV
переменные, отличные от development
.
rails c
работает, но rails c production
, rails c test
или любая другая пользовательская среда приводит к ошибке «Нет такого файла для загрузки - importenv (LoadError)».
Воттрассировка стека:
from /gems/activesupport-3.1.1/lib/active_support/dependencies.rb:306:in `rescue in depend_on': No such file to load -- importenv (LoadError)
from /gems/activesupport-3.1.1/lib/active_support/dependencies.rb:301:in `depend_on'
from /gems/activesupport-3.1.1/lib/active_support/dependencies.rb:214:in `require_dependency'
from /gems/railties-3.1.1/lib/rails/engine.rb:417:in `block (2 levels) in eager_load!'
from /gems/railties-3.1.1/lib/rails/engine.rb:416:in `each'
from /gems/railties-3.1.1/lib/rails/engine.rb:416:in `block in eager_load!'
from /gems/railties-3.1.1/lib/rails/engine.rb:414:in `each'
from /gems/railties-3.1.1/lib/rails/engine.rb:414:in `eager_load!'
from /gems/railties-3.1.1/lib/rails/application/finisher.rb:51:in `block in <module:Finisher>'
from /gems/railties-3.1.1/lib/rails/initializable.rb:30:in `instance_exec'
from /gems/railties-3.1.1/lib/rails/initializable.rb:30:in `run'
from /gems/railties-3.1.1/lib/rails/initializable.rb:55:in `block in run_initializers'
from /gems/railties-3.1.1/lib/rails/initializable.rb:54:in `each'
from /gems/railties-3.1.1/lib/rails/initializable.rb:54:in `run_initializers'
from /gems/railties-3.1.1/lib/rails/application.rb:96:in `initialize!'
from /gems/railties-3.1.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /config/environment.rb:5:in `<top (required)>'
from /ges/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
from /gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `block in require'
from /gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `block in load_dependency'
from /gems/activesupport-3.1.1/lib/active_support/dependencies.rb:640:in `new_constants_in'
from /gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `load_dependency'
from /gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'
from /gems/railties-3.1.1/lib/rails/application.rb:83:in `require_environment!'
from /gems/railties-3.1.1/lib/rails/commands.rb:39:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'