Closed christophe-dufour closed 10 years ago
Hi Chistophe,
the error is due to the fact that sidekiq-client does not load rails as it is built to run without the need to load rails, so 'Rails' is not defined and therefore Rails.env.production? is not defined
A workaround could be to use ENV["RAILS_ENV"] == "production" instead
Hi didil,
Thank you for the answer.
It works for me :)
I this it can be a good idea to write it down somewhere into sidekiq-client-cli documentation.
Hi there,
I use Sidekiq and Sidekiq in different environments (development/staging/production)
First at all, I try to configure my redis-server into my rails-app/config/environments/[development.rb | staging.rb | production.rb]
It took me a while to understand that sidekiq-client-cli does NOT read those files.
So I try to configure it into my rails-app/config/initilizers/sidekiq.rb
my code looks like this :
But in fact, when I call bundle exec sidekiq-client it raise an error and say
How to make it work?