resque-web yields ...Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `require': cannot load such file -- rack/showexceptions (LoadError)

Created on 19 Sep 2016  路  4Comments  路  Source: resque/resque

Logs:

$ resque-web config/initializers/resque.rb
C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `require': cannot load such file -- rack/showexceptions (LoadError)
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:39:in `require'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/sinatra-1.0/lib/sinatra/showexceptions.rb:1:in `<top (required)>'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/sinatra-1.0/lib/sinatra/base.rb:6:in `<top (required)>'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:121:in `require'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:121:in `require'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/resque-1.26.0/lib/resque/server.rb:1:in `<top (required)>'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
        from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/resque-1.26.0/bin/resque-web:10:in `<top (required)>'
        from C:/RailsInstaller/Ruby2.2.0/bin/resque-web:23:in `load'
        from C:/RailsInstaller/Ruby2.2.0/bin/resque-web:23:in `<main>'

1436 I followed the set up here:

gem 'resque', "~> 1.22.0"
gem 'sinatra', github: 'sinatra/sinatra', branch: 'master'

Though I'm using gem 'resque', "~> 1.22.0" because of some guideline on this heroku guide.

I even set up a config file same as the docs.

config/initializers/resque.rb

rails_root = ENV['RAILS_ROOT'] || File.dirname(__FILE__) + '/../..'
rails_env = ENV['RAILS_ENV'] || 'development'

resque_config = YAML.load_file(rails_root + '/config/resque.yml')
Resque.redis = resque_config[rails_env]

And here in resque.yml

development: localhost:6379
test: localhost:6379
staging: redis1.se.github.com:6379
fi: localhost:6379
production: redis1.ae.github.com:6379

Please assist.

Most helpful comment

Update: removed sinatra, resque and resque-scheduler via gem uninstall <gemname>, then ran bundle install to bring them all back. Ran resque-web and received: Could not find 'sinatra' (>= 0.9.2) among 176 total gem(s) (Gem::LoadError).

Running via bundle exec resque-web got it working. I guess outside of bundler, my system didn't know where sinatra was installed because running gem list sinatra showed nothing installed, but running bundle show sinatra shows it (correctly) in the rbenv directory for my current ruby version.

tl;dr run bundle exec resque-web to pull in the sinatra master branch dep. Hope this helps others.

All 4 comments

Receiving the same error, environment details below:

Ruby 2.3.0
Rails 5.0.0.1
resque 1.26.0
resque-scheduler 4.3.0

I tried this with require 'sinatra' and gem 'sinatra', github: 'sinatra/sinatra', branch: 'master' but received the error regardless.

@strong-code, Keep your settings but try gem 'rake', "~> 11.3.0". Tell me if that works.

I got mine to work on production, then it worked on development, so I'm not sure what I did. But I can tell you I don't need config/initializers/resque.rb or resque.yml. I believe this problem is just some gem incompatibility.

Update: removed sinatra, resque and resque-scheduler via gem uninstall <gemname>, then ran bundle install to bring them all back. Ran resque-web and received: Could not find 'sinatra' (>= 0.9.2) among 176 total gem(s) (Gem::LoadError).

Running via bundle exec resque-web got it working. I guess outside of bundler, my system didn't know where sinatra was installed because running gem list sinatra showed nothing installed, but running bundle show sinatra shows it (correctly) in the rbenv directory for my current ruby version.

tl;dr run bundle exec resque-web to pull in the sinatra master branch dep. Hope this helps others.

@strong-code

Yeah that could be what I did. I tried playing with resque-web but it didn't work on my machine so when I reverted back to resque in the Gemfile, not gem uninstall, I guess the dependencies stuck.

Was this page helpful?
0 / 5 - 0 ratings