skip to Main Content

I’m using ruby 2.4.2 and rails 5.0.6(system running well), and I’m trying to upgrade to rails 5.1.4, I changed Gemfiles from from gem ‘rails’, ‘5.0.6’ to gem ‘rails’, ‘5.1.4’, and run bundle update,

my question is when I did bundle update, Why redis-namespace downgraded to version 0.4.3 and resque downgraded to version 1.8.2 see trace console below.

Using redis 4.0.1 (was 3.3.5)
Using redis-namespace 0.4.3 (was 1.5.3)
Using resque 1.8.2 (was 1.27.4)

this causing I cannot run rails server, Thank you.

edit 2

Gemfile

source 'https://rubygems.org'

gem 'rails', '5.1.4'
gem 'pg', '~> 0.19'

# Use Uglifier as compressor for JavaScript assets
gem 'uglifier'

# Use CoffeeScript for .js.coffee assets and views
# gem 'coffee-rails', '4.0.1'
gem 'coffee-rails', '~> 4.2'

# Use jquery as the JavaScript library
gem 'jquery-rails'
gem 'jquery-turbolinks'
# gem 'jquery-ui-rails', '~> 4.2.1' # please note 4.2.1 is the compatible one
gem 'jquery-ui-rails'

# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', group: :doc
gem 'rake'
gem 'bootstrap-sass' # for twitter bootstrap
gem 'material_icons' # icon
gem 'sass-rails', '>= 3.2'
gem 'will_paginate'
gem 'ransack'
gem 'cancancan'
gem 'rmagick', require: false
gem 'carrierwave'
gem 'prawn'
gem 'prawn-table'
# resque
gem 'resque'
gem "sinatra", ">= 2.0.0.beta2", require: false 
gem 'thor', '0.19.1'
# csv import
gem 'smarter_csv'

# redis action cable
gem "hiredis"
gem "redis"

# webserver
gem 'puma', '3.6.2'

edit 3

Bundler could not find compatible versions for gem "redis":
  In Gemfile:
    redis (>= 4.0.1)

    resque (~> 1.27.0) was resolved to 1.27.4, which depends on
      redis-namespace (~> 1.3) was resolved to 1.3.1, which depends on
        redis (~> 3.0.0)

2

Answers


  1. Chosen as BEST ANSWER

    After did another researched and another error message I just found that for rails 5.x should use redis-rails instead of redis and another issue that I found today also json (needed by resque gem and sdoc), make sure gem 'json' with version >= 2.1.0 listed in Gemfile, if not usually bundler will install version 1.8.6 (which generate an error with rails 5.x), so for I found these 2 errors, I will update my answer in case I found another

    Gemfile

    gem "redis-rails"
    gem 'json', '>= 2.1.0'
    

  2. This is the issue with fixing gem dependencies to a patch/minor version.

    You should try using gem redis only in your Gemfile and then run bundle update. This should fix the issue. Some tests may break though especially if the public api of redis has been updated since the older version of redis. You may need to find the newer API to have everything working normally.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search