我试图通过bundler安装gem linecache19,它总是返回:
Installing linecache19 (0.5.12) /usr/local/lib/site_ruby/1.8/rubygems/installer.rb:388:in `ensure_required_ruby_version_met': linecache19 requires Ruby version >= 1.9.2. (Gem::InstallError)
from /usr/local/lib/site_ruby/1.8/rubygems/installer.rb:156:in `install'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.14/lib/bundler/source.rb:101:in `install'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.14/lib/bundler/rubygems_integration.rb:279:in `preserve_paths'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.14/lib/bundler/source.rb:91:in `install'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.14/lib/bundler/installer.rb:58:in `run'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.14/lib/bundler/rubygems_integration.rb:93:in `with_build_args'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.14/lib/bundler/installer.rb:57:in `run'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.14/lib/bundler/spec_set.rb:12:in `each'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.14/lib/bundler/spec_set.rb:12:in `each'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.14/lib/bundler/installer.rb:49:in `run'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.14/lib/bundler/installer.rb:8:in `install'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.14/lib/bundler/cli.rb:222:in `install'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.14/lib/bundler/vendor/thor/task.rb:22:in `send'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.14/lib/bundler/vendor/thor/task.rb:22:in `run'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.14/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.14/lib/bundler/vendor/thor.rb:246:in `dispatch'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.14/lib/bundler/vendor/thor/base.rb:389:in `start'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.14/bin/bundle:13
from /usr/bin/bundle:19:in `load'
from /usr/bin/bundle:19
显然看起来我安装了错误版本的ruby,但我知道我安装了ruby 1.9.2:
me@host:/rails/gitlabhq$ ruby -v
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]
我尝试手动安装没有问题的gem,但是Bundler仍然返回该输出并拒绝继续前进。
me@host:/rails/gitlabhq$ sudo gem install linecache19
Building native extensions. This could take a while...
Successfully installed linecache19-0.5.12
1 gem installed
我不确定为什么bundler没有安装gem /没有在系统gem库中看到它。
我没有在此服务器上安装RVM或类似的东西,它只使用系统ruby和系统gem库。
答案 0 :(得分:-1)
尝试通过rm -rf vendor/bundle
答案 1 :(得分:-1)