0

サーバーにロールアウトする前にアプリを本番環境で起動してテストすると、Resque.enqueue(worker)によって呼び出されるデータベース操作の1つが間違ったデータベースで実行されていることに気付きました。Production.sqlite3の代わりにdevelopment.sqlite3。サーバーとresqueの両方をゼロ構成ファイルで実行しています。正しい環境でredisまたはresqueを実行する方法が必要です。

defaults: &defaults
host: localhost
port: 6379
development:
<<: *defaults
test:
<<: *defaults
staging:
<<: *defaults
production:
<<: *defaults

私が見つけたこのredis設定ファイルはキーを保持している可能性がありますが、redisはそれを気に入らないと言っています

*** FATAL CONFIG FILE ERROR ***
 Reading the configuration file, at line 1
>>> 'defaults: &defaults'
Bad directive or wrong number of arguments
4

1 に答える 1

4

実稼働環境でresqueworkerを開始しましたか?あなたはこのようにそれを行うことができます、

$ RAILS_ENV = Production QUEUE = * rake resque:work
于 2012-08-23T20:13:38.263 に答える