1

出于某种原因,任何时候我都在使用 Ruby 1.8.7 运行 Rails 3.0.3 应用程序。它运行良好,我没有在任何地方设置任何cache_store设置。现在每当我尝试运行rake任务或rails命令时,我都会得到:

$:rails console production
/home/marc_m3pt0/.gems/gems/activesupport-3.0.3/lib/active_support/cache.rb:65:in `lookup_store': Could not find cache store adapter for memory_store (no such file to load -- active_support/cache/memory_store) (RuntimeError)
    from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/application/bootstrap.rb:48
    from /home/marc_m3pt0/.gems/gems/activesupport-3.0.3/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
    from /home/marc_m3pt0/.gems/gems/activesupport-3.0.3/lib/active_support/core_ext/kernel/reporting.rb:22:in `with_warnings'
    from /home/marc_m3pt0/.gems/gems/activesupport-3.0.3/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
    from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/application/bootstrap.rb:48
    from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/initializable.rb:25:in `instance_exec'
    from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/initializable.rb:25:in `run'
    from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/initializable.rb:50:in `run_initializers'
    from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/initializable.rb:49:in `each'
    from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/initializable.rb:49:in `run_initializers'
    from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/application.rb:134:in `initialize!'
    from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/application.rb:77:in `send'
    from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/application.rb:77:in `method_missing'
    from /home/marc_m3pt0/m3pt0.com/config/environment.rb:5
    from /home/marc_m3pt0/.gems/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
    from /home/marc_m3pt0/.gems/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
    from /home/marc_m3pt0/.gems/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:225:in `load_dependency'
    from /home/marc_m3pt0/.gems/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:596:in `new_constants_in'
    from /home/marc_m3pt0/.gems/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:225:in `load_dependency'
    from /home/marc_m3pt0/.gems/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
    from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/application.rb:103:in `require_environment!'
    from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/commands.rb:22
    from script/rails:6:in `require'
    from script/rails:6

关于我可能遗漏的任何想法?

非常感谢。我的客户网站现在已关闭,因此我们将不胜感激。

更新

当我运行 rake 任务时,我得到了这个:

Could not find cache store adapter for memory_store (no such file to load -- active_support/cache/memory_store)
4

1 回答 1

1

我最近在共享主机将应用程序移动到新服务器时看到了这个错误。我最终吹走了应用程序的捆绑包并重新安装它,它似乎工作。

我使用 Capistrano 进行部署,所以如果你使用其他东西,YMMV。如果您的应用程序根是这样的:

/home/jeff/myapp/

具有以下子目录:

/home/jeff/myapp/current
/home/jeff/myapp/releases
/home/jeff/myapp/shared

宝石包在这里:

/home/jeff/myapp/shared/bundle

然后我做了:

rm -rf /home/jeff/myapp/shared/bundle

然后

cd /home/jeff/myapp
bundle install

一旦我这样做了,它似乎对我有用。

于 2012-05-09T02:14:34.017 回答