linecache19 不会通过捆绑程序安装
我尝试通过捆绑器安装 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,没有问题,但捆绑器仍然返回该输出并拒绝继续。
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
我不确定为什么捆绑程序没有安装 gem/没有在系统 gem 库中看到它。
我没有在该服务器上安装 RVM 或类似的东西,它只使用系统 ruby 和系统 gem 库。
Im trying to install the gem linecache19 via bundler and it always returns:
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
Obviously it looks like i have the wrong version of ruby installed but I know for a fact I have ruby 1.9.2 installed:
me@host:/rails/gitlabhq$ ruby -v
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]
I tried manually installing the gem which worked no problem, but bundler still returns that output and refuses to move on.
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
I'm not sure why bundler is not installing the gem/not seeing it in the system gem library.
I dont have RVM or anything like that installed on this server, it just uses the system ruby and system gem library.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试通过
rm -rfvendor/bundle
删除您的捆绑包Try deleting your bundle via
rm -rf vendor/bundle
这个 拉取请求 让我认为如果你与此选项捆绑在一起它会起作用
YMMV
This pull request makes me think it will work if you bundle with this option
YMMV