0

Unicorn がループしており、以下のエラーが表示されます。

ユニコーンエラー

エラー -- : dalli_store のキャッシュ ストア アダプタが見つかりませんでした (そのようなファイルをロードできません -- active_support/cache/dalli_store) (RuntimeError)

production.rb

config.cache_store = :dalli_store, "127.0.0.1:11211", { :namespace => "my-app", :expires_in => 3600 }

gemfile

gem 'dalli', '~>2.1.0', :git => "git://github.com/mperham/dalli.git"

Rails コンソールでテストしたところ、dalli に問題はないようです。

Loading production environment (Rails 3.2.8)
irb(main):001:0> Rails.cache.write("hello", "world")
=> true
irb(main):002:0> Rails.cache.read("hello")
=> "world"

irb(main):002:0> Rails.cache
=> #<ActiveSupport::Cache::DalliStore:0xabaefc8 @options={:namespace=>"my-app", :expires_in=>3600, :compress=>nil}, @raise_errors=false, @data=#<Dalli::Client:0xabaef00 @servers=["127.0.0.1:11211"], @options={:namespace=>"my-app", :expires_in=>3600, :compress=>nil}, @ring=#<Dalli::Ring:0xa2db0e0 @servers=[#<Dalli::Server:0xa2db158 @hostname="127.0.0.1", @port=11211, @weight=1, @fail_count=0, @down_at=nil, @last_down_at=nil, @options={:down_retry_delay=>1, :socket_timeout=>0.5, :socket_max_failures=>2, :socket_failure_delay=>0.01, :value_max_bytes=>1048576, :username=>nil, :password=>nil, :keepalive=>true, :namespace=>"my-app", :expires_in=>3600, :compress=>nil}, @sock=#<Dalli::Server::KSocket:fd 8>, @msg=nil, @pid=27069, @inprogress=false, @lock=#<Monitor:0xa2db0a4 @mon_owner=nil, @mon_count=0, @mon_mutex=#<Mutex:0xa2db07c>>, @version="1.4.2", @error=nil>], @continuum=nil, @failover=true>>>

どんな助けでも大歓迎です。

4

2 に答える 2

0

誰かが同様の問題に遭遇した場合: バンドラーによってダウンロードされた Gemfile.lock と dalli gemspec ファイル (/path/to/app/shared/bundler/gems/ruby/1.8/specifications/dalli.gemspec のような場所) を削除し、実行しました「バンドルインストール」とそれが役に立ちました。

于 2013-01-14T06:43:54.157 に答える