false irb(main):002:0> -6ren">
gpt4 book ai didi

Ruby 需要错误

转载 作者:行者123 更新时间:2023-12-04 18:42:07 24 4
gpt4 key购买 nike

需要安装的 gem 不可见。

用我安装了几次的 hpricot 进行测试:

irb(main):001:0> require "rubygems"
=> false
irb(main):002:0> require "hpricot"
LoadError: no such file to load -- hpricot
from (irb):2:in `require'
from (irb):2
from /usr/bin/irb:12:in `<main>'
irb(main):003:0>

RubyGems 环境:
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.7
- RUBY VERSION: 1.9.2 (2010-07-02 patchlevel -1) [i486-linux]
- INSTALLATION DIRECTORY: /var/lib/gems/1.9.2
- RUBY EXECUTABLE: /usr/bin/ruby1.9.2
- EXECUTABLE DIRECTORY: /var/lib/gems/1.9.2/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- GEM PATHS:
- /var/lib/gems/1.9.2
- /root/.gem/ruby/1.9.2
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/

我安装了多个版本的 ruby​​(回溯 5r2)
targeex@bt:/home/targeex/Stage/Application_Wissam# update-alternatives --config ruby
There are 2 choices for the alternative ruby (providing /usr/bin/ruby).

Selection Path Priority Status
------------------------------------------------------------
0 /usr/bin/ruby1.8 600 auto mode
1 /usr/bin/ruby1.8 600 manual mode
* 2 /usr/bin/ruby1.9.2 400 manual mode

Press enter to keep the current choice[*], or type selection number: 2

我能做些什么?

最佳答案

看起来您可能没有在正确的 ruby 中安装 gem。如果可以的话,切换到使用 RVM (https://rvm.io/) 它会治愈你的困扰。

关于Ruby 需要错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11032657/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com