1

我继承了一个 rails 2.3.2 应用程序,并让它在 rbenv 下使用 ruby​​ 1.8.7 工作,包括一些旧版本的其他 gems 和软件。

现在我生成了一个 Gemfile 并尝试通过对其运行任何捆绑命令来验证它,例如捆绑检查、安装等,但是这些操作中的任何一个都失败了。我安装了 rbenv bundler 插件,这使它看起来不那么严重,但我仍然无法弄清楚。

$ bundle -V
/usr/local/lib/site_ruby/1.9.1/rubygems.rb:846: Use RbConfig instead of obsolete and deprecated Config.
/usr/lib/ruby/vendor_ruby/bundler/rubygems_integration.rb:310:in `<module:Bundler>': uninitialized constant Gem::VERSION (NameError)
    from /usr/lib/ruby/vendor_ruby/bundler/rubygems_integration.rb:1:in `<top (required)>'
    from /usr/lib/ruby/vendor_ruby/bundler.rb:12:in `require'
    from /usr/lib/ruby/vendor_ruby/bundler.rb:12:in `<top (required)>'
    from /usr/bin/bundle:4:in `require'
    from /usr/bin/bundle:4:in `<main>'

我的捆绑器安装:

$ which bundle
/usr/bin/bundle

红宝石:

$ ruby -v
ruby 1.8.7 (2012-02-08 patchlevel 358) [x86_64-linux]

Rbenv 现在也给我带来了问题:

$ rbenv alternatives 
Skipping 1.8.7-debian, it already exists
/usr/local/lib/site_ruby/1.9.1/rubygems.rb:846: Use RbConfig instead of obsolete and deprecated Config.
Skipping 1.9.3-debian, it already exists

捆绑器不应该有垫片吗?似乎直接调用了bundler。

我搞不清楚了。如果有人可以帮助我,我会很高兴。

ps:我也刚刚发现:

$ rbenv rehash 
/usr/local/lib/site_ruby/1.9.1/rubygems.rb:846: Use RbConfig instead of obsolete and deprecated Config.
/usr/lib/ruby/vendor_ruby/bundler/rubygems_integration.rb:310:in `<module:Bundler>': uninitialized constant Gem::VERSION (NameError)
    from /usr/lib/ruby/vendor_ruby/bundler/rubygems_integration.rb:1:in `<top (required)>'
    from /usr/lib/ruby/vendor_ruby/bundler.rb:12:in `require'
    from /usr/lib/ruby/vendor_ruby/bundler.rb:12:in `<top (required)>'
    from /home/bernhard/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:361:in `require'
    from /home/bernhard/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:361:in `require_and_patch_bundler'
    from /home/bernhard/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:427:in `<main>'
cat: /home/bernhard/.rbenv/plugins/bundler/share/rbenv/bundler/manifest.txt: No such file or directory
4

0 回答 0