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

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) #1510

Closed
kamok opened this issue Sep 19, 2016 · 4 comments

Comments

@kamok
Copy link

kamok commented Sep 19, 2016

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.

@strong-code
Copy link

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.

@kamok
Copy link
Author

kamok commented Oct 16, 2016

@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.

@strong-code
Copy link

strong-code commented Oct 16, 2016

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.

@kamok
Copy link
Author

kamok commented Oct 16, 2016

@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.

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

No branches or pull requests

3 participants