Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

require 'rails' before initialize config #200

Conversation

highwide
Copy link

@highwide highwide commented Apr 27, 2016

In order to fix this👇 (I guess it's been since #191 )

config/shoryuken.yml

queues:
  - [<%= Rails.env %>-foo-bar-queue, 2]
% bundle exec shoryuken -R -C config/shoryuken.yml
uninitialized constant Rails
...

@phstc
Copy link
Collaborator

phstc commented Apr 28, 2016

Hi @highwide

I was wondering if we should - [<%= ENV['RAILS_ENV'] %>-foo-bar-queue, 2] instead. Sidekiq only requires Rails, after loading the config files: https://github.com/mperham/sidekiq/blob/78fc103d561792b876854706f0e8acdc3b3379f4/lib/sidekiq/cli.rb#L222

I'm not sure if there's a specific reason for that.

@highwide
Copy link
Author

highwide commented May 2, 2016

Thank you @phstc

It's a pity but I understood that I can't use like <%= Rails.env.production? ? '': "#{Rails.env}-" %>
I'll use RAILS_ENV and close this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants