“Please point sidekiq to a Rails 3 application or a Ruby file to load your worker classes with -r DIR|FILE.”
I received this error while attempting to use Sidekiq in a Sinatra app. To solve this problem, use the
-r option to point Sidekiq to your main Sinatra file.
1 2 3
-r option is also used by
pry to preload dependencies.
pry -r ./app.rb gives you access to all our your methods in
app.rb without the need to require it via console.