2013-03-18 66 views
0

我在我的Rails應用程序中執行了「捆綁安裝」。首先,我得到了以下信息:Bundle無法使用較早版本的捆綁軟件

Bundler could not find compatible versions for gem "bundler": 
    In Gemfile: 
    rails (= 3.0.1) ruby depends on 
     bundler (~> 1.0.0) ruby 

    Current Bundler version: 
    bundler (1.3.4) 

This Gemfile requires a different version of Bundler. 

然後,我在這裏找到一個線程How to bundle install when your Gemfile requires an older version of bundler?

但我$束1.0.22安裝「後,我得到的消息是這樣的:

/home/chinseone/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- rubygems/format (LoadError) 
from /home/chinseone/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require' 
from /home/chinseone/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.0.22/lib/bundler/source.rb:5:in `<top (required)>' 
from /home/chinseone/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.0.22/lib/bundler/dsl.rb:14:in `initialize' 
from /home/chinseone/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.0.22/lib/bundler/dsl.rb:6:in `new' 
from /home/chinseone/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.0.22/lib/bundler/dsl.rb:6:in `evaluate' 
from /home/chinseone/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.0.22/lib/bundler/definition.rb:17:in `build' 
from /home/chinseone/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.0.22/lib/bundler.rb:138:in `definition' 
from /home/chinseone/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.0.22/lib/bundler/cli.rb:219:in `install' 
from /home/chinseone/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.0.22/lib/bundler/vendor/thor/task.rb:22:in `run' 
from /home/chinseone/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.0.22/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task' 
from /home/chinseone/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.0.22/lib/bundler/vendor/thor.rb:263:in `dispatch' 
from /home/chinseone/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.0.22/lib/bundler/vendor/thor/base.rb:386:in `start' 
from /home/chinseone/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.0.22/bin/bundle:13:in `<top (required)>' 
from /home/chinseone/.rvm/gems/ruby-2.0.0-p0/bin/bundle:23:in `load' 
from /home/chinseone/.rvm/gems/ruby-2.0.0-p0/bin/bundle:23:in `<main>' 
from /home/chinseone/.rvm/gems/ruby-2.0.0-p0/bin/ruby_noexec_wrapper:14:in `eval' 
from /home/chinseone/.rvm/gems/ruby-2.0.0-p0/bin/ruby_noexec_wrapper:14:in `<main>' 

而相應的內容是:

# If there are no unresolved deps, then we can use just try 
# normal require handle loading a gem from the rescue below. 

if Gem::Specification.unresolved_deps.empty? then 
    return gem_original_require(path) 
end 

如何安裝並鎖定到捆綁器的正確版本?萬分感激!!

+0

嘗試運行:包更新 – 2013-03-18 07:04:48

+0

不,顯示爲「包安裝」上述同樣的消息 – chinseone 2013-03-18 07:09:45

回答

-1

去你Gemfile.lock的改變你的包要求