2012-03-14 61 views
2

Bundler 1.1.1似乎与rake不兼容。耙子中止! Bundler无法找到兼容版本的宝石“捆绑器”

我不知道是怎么回事, 我试图安装webistrano,当我跑到下面的命令

RAILS_ENV=production rake db:migrate 

我:

耙中止!捆绑无法找到宝石 “捆绑” 兼容的版本:

在Gemfile中:

bundler (~> 1.0.10) ruby 

当前捆绑版本:

bundler (1.1.1) 

这Gemfile中需要不同版本捆绑的。 也许你需要通过运行`gem install bundler`来更新Bundler?

我真的不知道该从哪里做些什么,两周前我刚刚拿起了红宝石,并且我并不十分熟悉所有不同的宝石,以及它们应该如何工作。

其他信息

> ruby -version 
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux] 

> gem list 

*** LOCAL GEMS *** 


actionmailer (3.2.2) 
actionpack (3.2.2) 
activemodel (3.2.2) 
activerecord (3.2.2) 
activeresource (3.2.2) 
activesupport (3.2.2) 
arel (3.0.2) 
bigdecimal (1.1.0) 
builder (3.0.0) 
bundler (1.1.1) 
capistrano (2.11.2) 
erubis (2.7.0) 
highline (1.6.11) 
hike (1.2.1) 
i18n (0.6.0) 
io-console (0.3) 
journey (1.0.3) 
json (1.6.5, 1.5.4) 
mail (2.4.4) 
mime-types (1.17.2) 
minitest (2.11.3, 2.5.1) 
multi_json (1.1.0) 
net-scp (1.0.4) 
net-sftp (2.0.5) 
net-ssh (2.3.0) 
net-ssh-gateway (1.1.0) 
polyglot (0.3.3) 
rack (1.4.1) 
rack-cache (1.2) 
rack-ssl (1.3.2) 
rack-test (0.6.1) 
rails (3.2.2) 
railties (3.2.2) 
rake (0.9.2.2) 
rdoc (3.12, 3.9.4) 
sprockets (2.3.1, 2.1.2) 
thor (0.14.6) 
tilt (1.3.3) 
treetop (1.4.10) 
tzinfo (0.3.32) 

谢谢。

回答

2

你可以尝试改变:

~> 1.0.10 

少严格,允许新版本的一些东西,比如

>= 1.0.10 
+0

其实,在我目前的Rails项目中,我注意到我没有在我的Gemfile中引用bundler,因此您也可以尝试彻底删除bundler行。 – 2012-03-15 00:25:32

+0

对不起,但〜>是什么意思?大约到1.0.10? – confiq 2013-11-24 11:04:44

+1

@confiq我见过它叫做“悲观版本opertator”,“twiddle waka operator”和“精子运算符”。它允许较小的更新,但不是主要的更新。所以,在这种情况下,它会更新到1.0.11,但不是1.1.0;这里有一个很好的链接:http://robots.thoughtbot.com/rubys-pessimistic-operator – 2013-12-06 20:54:40

1

变化

~> 1.0.10 

~> 1.1.0 

允许您当前的Bundler gem版本(1.1.1)成功使用。

相关问题