linecache19 不会通过捆绑程序安装

发布于 2024-12-10 16:55:07 字数 2509 浏览 0 评论 0原文

我尝试通过捆绑器安装 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

丑疤怪 2024-12-17 16:55:07

尝试通过 rm -rfvendor/bundle 删除您的捆绑包

Try deleting your bundle via rm -rf vendor/bundle

五里雾 2024-12-17 16:55:07

这个 拉取请求 让我认为如果你与此选项捆绑在一起它会起作用

bundle install --without development test

YMMV

This pull request makes me think it will work if you bundle with this option

bundle install --without development test

YMMV

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文