Bundler could not find compatible versions for gem “rack”:

北城余情 提交于 2019-12-11 02:59:29

问题


I am new to Ruby but actually I don't need it if I don't want to install Redmine. I am following the instructions at http://www.redmine.org/projects/redmine/wiki/HowTo_install_Redmine_on_CentOS_Detailed

I have installed ruby 1.9 using

rvm install 1.9.3

and ruby gems using...

sudo yum install rubygems

Then coming to the part of creating the Gemfile and register these gems in it

# file: /var/www/redmine/Gemfile
source "http://rubygems.org" 
gem "rake", "0.8.3" 
gem "rack", "1.1.0" 
gem "i18n", "0.4.2" 
gem "rubytree", "0.5.2", :require => "tree" 
gem "RedCloth", "~>4.2.3", :require => "redcloth" # for CodeRay
gem "mysql" 
gem "coderay", "~>0.9.7" 

and my file looks like...

source 'https://rubygems.org'
gem "rake", "0.8.3"
gem "rack", "1.1.0"
gem "i18n", "0.4.2"
gem "rubytree", "0.5.2", :require => "tree"
gem "RedCloth", "~>4.2.3", :require => "redcloth" # for CodeRay
gem "mysql"


gem "rails", "3.2.15"
gem "jquery-rails", "~> 2.0.2"
gem "coderay", "~> 1.1.0"
gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby]
gem "builder", "3.0.0"

# Optional gem for LDAP authentication

When I run

bundle install

it gives me...

Please configure your config/database.yml first
Fetching gem metadata from https://rubygems.org/.......
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "rack":
  In Gemfile:
    rails (= 3.2.15) ruby depends on
      rack (~> 1.4.5) ruby

    rack (1.1.0)

I don't know what to do.


回答1:


You updated the rails version which required rack (1.4.5), where previous version was locked on rack (1.1.0), for a quick fix

remove the gemfile.lock and run bundle install again

hope it will resolve your problem...



来源:https://stackoverflow.com/questions/22704671/bundler-could-not-find-compatible-versions-for-gem-rack

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!