Bundler找不到gem“rack”的兼容版本:

时间:2022-08-21 00:18:30

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

我是Ruby新手,但如果我不想安装Redmine,我就不需要它了。我正在遵循http://www.redmine.org/projects/redmine/wiki/howto_install_redmine_on_centos_details中的说明

I have installed ruby 1.9 using

我已经安装了ruby 1.9

rvm install 1.9.3

and ruby gems using...

和ruby gems使用……

sudo yum install rubygems

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

然后来创建Gemfile并在其中注册这些gem。

# 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 个解决方案

#1


5  

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

您更新了rails版本,它需要机架(1.4.5),以前的版本锁在机架上(1.1.0),以便快速修复

remove the gemfile.lock and run bundle install again

删除gemfile。再次安装并运行bundle。

hope it will resolve your problem...

希望它能解决你的问题……

#1


5  

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

您更新了rails版本,它需要机架(1.4.5),以前的版本锁在机架上(1.1.0),以便快速修复

remove the gemfile.lock and run bundle install again

删除gemfile。再次安装并运行bundle。

hope it will resolve your problem...

希望它能解决你的问题……