简体   繁体   中英

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

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM