Reputation: 7862
in my rails app that uses Rails 5 beta 3 I have problem with using sidekiq. I added sidekiq to my gemfile. Run bundle install and when I try to run the server it throws error:
/home/mateusz/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:80:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'sidekiq'. (Bundler::GemRequireError)
I've tried to install sidekiq from rails5 branch and master but this does not solve the problem.
Any ideas?
EDIT
Here is whole stacktrace
/home/mateusz/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:80:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'sidekiq'. (Bundler::GemRequireError)
from /home/mateusz/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /home/mateusz/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
from /home/mateusz/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
from /home/mateusz/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
from /home/mateusz/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
from /home/mateusz/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
from /home/mateusz/projects/athena-poc/config/application.rb:7:in `<top (required)>'
from /home/mateusz/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.beta3/lib/rails/commands/commands_tasks.rb:88:in `require'
from /home/mateusz/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.beta3/lib/rails/commands/commands_tasks.rb:88:in `block in server'
from /home/mateusz/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.beta3/lib/rails/commands/commands_tasks.rb:85:in `tap'
from /home/mateusz/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.beta3/lib/rails/commands/commands_tasks.rb:85:in `server'
from /home/mateusz/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.beta3/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from /home/mateusz/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.beta3/lib/rails/command.rb:20:in `run'
from /home/mateusz/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.beta3/lib/rails/commands.rb:18:in `<top (required)>'
from /home/mateusz/projects/athena-poc/bin/rails:9:in `require'
from /home/mateusz/projects/athena-poc/bin/rails:9:in `<top (required)>'
from /home/mateusz/.rvm/gems/ruby-2.3.0/gems/spring-1.6.4/lib/spring/client/rails.rb:28:in `load'
from /home/mateusz/.rvm/gems/ruby-2.3.0/gems/spring-1.6.4/lib/spring/client/rails.rb:28:in `call'
from /home/mateusz/.rvm/gems/ruby-2.3.0/gems/spring-1.6.4/lib/spring/client/command.rb:7:in `call'
from /home/mateusz/.rvm/gems/ruby-2.3.0/gems/spring-1.6.4/lib/spring/client.rb:28:in `run'
from /home/mateusz/.rvm/gems/ruby-2.3.0/gems/spring-1.6.4/bin/spring:49:in `<top (required)>'
from /home/mateusz/.rvm/gems/ruby-2.3.0/gems/spring-1.6.4/lib/spring/binstub.rb:11:in `load'
from /home/mateusz/.rvm/gems/ruby-2.3.0/gems/spring-1.6.4/lib/spring/binstub.rb:11:in `<top (required)>'
from /home/mateusz/projects/athena-poc/bin/spring:13:in `require'
from /home/mateusz/projects/athena-poc/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
whole application.rb file:
require File.expand_path('../boot', __FILE__)
require 'rails/all'
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
module AthenaPoc
class Application < Rails::Application
config.generators do |g|
g.test_framework :rspec,
fixtures: true,
view_specs: false,
helper_specs: false,
routing_specs: false,
controller_specs: false,
request_specs: false
g.fixture_replacement :factory_girl, dir: "spec/factories"
end
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
# config.time_zone = 'Central Time (US & Canada)'
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
config.autoload_paths += %W(#{config.root}/lib/athena)
# Do not swallow errors in after_commit/after_rollback callbacks.
config.active_record.raise_in_transactional_callbacks = true
config.exceptions_app = self.routes
end
end
Upvotes: 1
Views: 4072
Reputation: 7921
I ran into the same problem, and although it was installing the gems fine, there was some compatibility problem. Following along here, I found that updating all the redis gems to master solved the problem.
gem 'redis'
gem 'redis-rack', github: 'redis-store/redis-rack', branch: 'master'
gem 'redis-activesupport', github: 'redis-store/redis-activesupport', branch: 'master'
gem 'redis-actionpack', github: 'redis-store/redis-actionpack', branch: 'master'
gem 'redis-rails', github: 'redis-store/redis-rails', branch: 'master'
gem 'sidekiq'
Upvotes: 1