gpt4 book ai didi

ruby - 为什么 RVM gem 列表显示我没有安装的 gem?

转载 作者:太空宇宙 更新时间:2023-11-03 17:58:39 25 4
gpt4 key购买 nike

我在 Dreamhost 共享主机上。我安装了 RVM 来运行 Ruby 1.9.2,并创建了一个空的 gemset 来使用。我对它运行了 gemset empty 命令以确保它真的是空的。

奇怪的是,如果我运行 rvm gemset use MYGEMSET 然后运行 ​​rvm do gem list,我会得到一长串 Dreamhost 提供的开箱即用的 gem。

[phantom]$ rvm do gem list
WARN: `rvm do gem list` is deprecated, use `rvm all do gem list` or `rvm 1.9.2 do gem list` instead.

*** LOCAL GEMS ***

Invalid gemspec in [/usr/lib/ruby/gems/1.8/specifications/archive-tar-minitar-0.5.1.gemspec]: /usr/lib/ruby/gems/1.8/specifications/archive-tar-minitar-0.5.1.gemspec:12: invalid multibyte char (UTF-8)
/usr/lib/ruby/gems/1.8/specifications/archive-tar-minitar-0.5.1.gemspec:12: syntax error, unexpected tIDENTIFIER, expecting keyword_end
...d heavily on Mauricio Fern?ndez's implementation in rpa-base...
... ^
/usr/lib/ruby/gems/1.8/specifications/archive-tar-minitar-0.5.1.gemspec:31: syntax error, unexpected tFLOAT, expecting keyword_end
...rsion) >= Gem::Version.new('1.2.0') then
... ^
/usr/lib/ruby/gems/1.8/specifications/archive-tar-minitar-0.5.1.gemspec:31: no .<digit> floating literal anymore; put 0 before dot
...sion) >= Gem::Version.new('1.2.0') then
... ^
/usr/lib/ruby/gems/1.8/specifications/archive-tar-minitar-0.5.1.gemspec:31: unterminated string meets end of file
abstract (1.0.0)
actionmailer (3.0.3, 2.3.8, 2.3.5, 2.3.4, 2.3.3, 2.2.2, 2.1.2, 2.1.1, 2.1.0, 2.0.5, 2.0.2)
actionpack (3.0.3, 2.3.8, 2.3.5, 2.3.4, 2.3.3, 2.2.2, 2.1.2, 2.1.1, 2.1.0, 2.0.5, 2.0.2)
actionwebservice (1.2.6, 1.2.3)
activemodel (3.0.3)
activerecord (3.0.3, 2.3.8, 2.3.5, 2.3.4, 2.3.3, 2.2.2, 2.1.2, 2.1.1, 2.1.0, 2.0.5, 2.0.2)
activeresource (3.0.3, 2.3.8, 2.3.5, 2.3.4, 2.3.3, 2.2.2, 2.1.2, 2.1.1, 2.1.0, 2.0.5, 2.0.2)
activesupport (3.0.3, 2.3.8, 2.3.5, 2.3.4, 2.3.3, 2.2.2, 2.1.2, 2.1.1, 2.1.0, 2.0.5, 2.0.2)
acts_as_taggable (2.0.2, 1.0.4)
ajax_scaffold_generator (3.1.11, 2.2.1)
archive-tar-minitar (0.5.2)
arel (2.0.4)
auth_generator (2.0.1, 1.5.3)
Bloglines4R (0.1.0)
BlueCloth (1.0.0)
builder (2.1.2, 2.0.0)
bundler (1.0.7)
bunny (0.6.0)
camping (1.5.180, 1.5)
capistrano (2.5.1, 2.1.0, 1.4.1)
cgi_multipart_eof_fix (2.5.0)
chef (0.10.2)
classifier (1.3.1)
cmdparse (2.0.2, 2.0.0)
curb (0.1.4)
daemons (1.0.10, 1.0.9)
dbd-mysql (0.4.3)
dbi (0.4.3)
deprecated (2.0.1)
erubis (2.6.6)
eventmachine (0.12.10, 0.12.8)
facets (2.2.1, 1.8.54)
fastthread (1.0.7, 1.0.1)
feedtools (0.2.29, 0.2.28)
ferret (0.11.6, 0.11.4)
flickr (1.0.2)
gd2 (1.1.1, 1.1)
gem_plugin (0.2.3)
gen (0.41.0)
geoip (0.6.1)
gettext (1.90.0)
glue (0.41.0)
gnuplot (2.2)
gravtastic (2.0.0)
gruff (0.3.1)
haml (2.0.3)
highline (1.6.2)
hoe (2.7.0)
hpricot (0.6)
htmltools (1.10)
i18n (0.4.2, 0.4.1)
json (1.5.1)
localization_generator (1.0.8)
login_generator (1.2.2)
logstash-lite (0.2.20110206003603)
madeleine (0.7.3)
mail (2.2.15)
markaby (0.5)
mechanize (0.7.6)
metaid (1.0)
mime-types (1.16)
mini_magick (1.2.3)
mixlib-authentication (1.1.0)
mixlib-cli (1.1.0)
mixlib-config (1.1.2)
mixlib-log (1.3.0)
moneta (0.6.0)
mongrel (1.1.5, 1.1.4)
mysql (2.7)
needle (1.3.0)
net-scp (1.0.4)
net-sftp (2.0.5, 1.1.1)
net-ssh (2.1.4)
net-ssh-gateway (1.1.0)
net-ssh-multi (1.1, 1.0.1)
nitro (0.41.0)
nokogiri (1.4.4)
og (0.41.0)
ohai (0.6.0)
oniguruma (1.1.0)
packet (0.1.14)
PageTemplate (2.2.0)
ParseTree (2.1.1)
payment (1.0.1)
pdf-writer (1.1.8)
podcast (0.0.4)
polyglot (0.3.1)
rack (1.2.1, 1.1.0, 1.0.1, 1.0.0)
rack-mount (0.6.13)
rack-test (0.5.6)
radiant (0.6.9)
rails (3.0.3, 2.3.8, 2.3.5, 2.3.4, 2.3.3, 2.2.2, 2.1.2, 2.1.1, 2.1.0, 2.0.5, 2.0.2)
railties (3.0.3)
rake (0.8.7)
RedCloth (3.0.4)
rest-client (1.6.3)
rfacebook (0.9.8)
rmagick (1.15.14)
rspec (1.1.3)
ruby-breakpoint (0.5.1)
ruby-debug (0.10.0)
ruby-openid (2.1.7)
ruby-yadis (0.3.4)
ruby_odeum (0.4.1)
rubyforge (2.0.4)
RubyInline (3.6.7)
rubypants (0.2.0)
rubyzip (0.9.1)
ruport (1.6.0)
ruport-util (0.14.0)
ruwiki (0.9.3)
salted_login_generator (2.0.2)
shipping (1.5.1)
SimpleSearch (0.5.0)
sqlite3-ruby (1.2.1)
stemmer (1.0.1)
switchtower (1.0.1)
syntax (1.0.0)
systemu (2.2.0)
tagtools (0.0.3)
thin (1.2.5, 1.2.2)
thor (0.14.6, 0.14.4)
tidy (1.1.2)
treetop (1.4.9)
tzinfo (0.3.23)
unicode (0.1)
uuidtools (1.0.3)
webgen (0.4.7)
wee (0.10.0)
xhtmldiff (1.0.0)
xml-simple (1.0.11)
yajl-ruby (0.8.2)
ym4r (0.6.1)
youtube-g (0.4.9.9)

*** LOCAL GEMS ***

abstract (1.0.0)
actionmailer (3.0.3, 2.3.8, 2.3.5, 2.3.4, 2.3.3, 2.2.2, 2.1.2, 2.1.1, 2.1.0, 2.0.5, 2.0.2)
actionpack (3.0.3, 2.3.8, 2.3.5, 2.3.4, 2.3.3, 2.2.2, 2.1.2, 2.1.1, 2.1.0, 2.0.5, 2.0.2)
actionwebservice (1.2.6, 1.2.3)
activemodel (3.0.3)
activerecord (3.0.3, 2.3.8, 2.3.5, 2.3.4, 2.3.3, 2.2.2, 2.1.2, 2.1.1, 2.1.0, 2.0.5, 2.0.2)
activeresource (3.0.3, 2.3.8, 2.3.5, 2.3.4, 2.3.3, 2.2.2, 2.1.2, 2.1.1, 2.1.0, 2.0.5, 2.0.2)
activesupport (3.0.3, 2.3.8, 2.3.5, 2.3.4, 2.3.3, 2.2.2, 2.1.2, 2.1.1, 2.1.0, 2.0.5, 2.0.2)
acts_as_taggable (2.0.2, 1.0.4)
ajax_scaffold_generator (3.1.11, 2.2.1)
archive-tar-minitar (0.5.2, 0.5.1)
arel (2.0.4)
auth_generator (2.0.1, 1.5.3)
Bloglines4R (0.1.0)
BlueCloth (1.0.0)
builder (2.1.2, 2.0.0)
bundler (1.0.7)
bunny (0.6.0)
camping (1.5.180, 1.5)
capistrano (2.5.1, 2.1.0, 1.4.1)
cgi_multipart_eof_fix (2.5.0)
chef (0.10.2)
classifier (1.3.1)
cmdparse (2.0.2, 2.0.0)
curb (0.1.4)
daemons (1.0.10, 1.0.9)
dbd-mysql (0.4.3)
dbi (0.4.3)
deprecated (2.0.1)
erubis (2.6.6)
eventmachine (0.12.10, 0.12.8)
facets (2.2.1, 1.8.54)
fastthread (1.0.7, 1.0.1)
feedtools (0.2.29, 0.2.28)
ferret (0.11.6, 0.11.4)
flickr (1.0.2)
gd2 (1.1.1, 1.1)
gem_plugin (0.2.3)
gen (0.41.0)
geoip (0.6.1)
gettext (1.90.0)
glue (0.41.0)
gnuplot (2.2)
gravtastic (2.0.0)
gruff (0.3.1)
haml (2.0.3)
highline (1.6.2)
hoe (2.7.0)
hpricot (0.6)
htmltools (1.10)
i18n (0.4.2, 0.4.1)
json (1.5.1)
localization_generator (1.0.8)
login_generator (1.2.2)
logstash-lite (0.2.20110206003603)
madeleine (0.7.3)
mail (2.2.15)
markaby (0.5)
mechanize (0.7.6)
metaid (1.0)
mime-types (1.16)
mini_magick (1.2.3)
mixlib-authentication (1.1.0)
mixlib-cli (1.1.0)
mixlib-config (1.1.2)
mixlib-log (1.3.0)
moneta (0.6.0)
mongrel (1.1.5, 1.1.4)
mysql (2.7)
needle (1.3.0)
net-scp (1.0.4)
net-sftp (2.0.5, 1.1.1)
net-ssh (2.1.4)
net-ssh-gateway (1.1.0)
net-ssh-multi (1.1, 1.0.1)
nitro (0.41.0)
nokogiri (1.4.4)
og (0.41.0)
ohai (0.6.0)
oniguruma (1.1.0)
packet (0.1.14)
PageTemplate (2.2.0)
ParseTree (2.1.1)
payment (1.0.1)
pdf-writer (1.1.8)
podcast (0.0.4)
polyglot (0.3.1)
rack (1.2.1, 1.1.0, 1.0.1, 1.0.0)
rack-mount (0.6.13)
rack-test (0.5.6)
radiant (0.6.9)
rails (3.0.3, 2.3.8, 2.3.5, 2.3.4, 2.3.3, 2.2.2, 2.1.2, 2.1.1, 2.1.0, 2.0.5, 2.0.2)
railties (3.0.3)
rake (0.8.7)
RedCloth (3.0.4)
rest-client (1.6.3)
rfacebook (0.9.8)
rmagick (1.15.14)
rspec (1.1.3)
ruby-breakpoint (0.5.1)
ruby-debug (0.10.0)
ruby-openid (2.1.7)
ruby-yadis (0.3.4)
ruby_odeum (0.4.1)
rubyforge (2.0.4)
RubyInline (3.6.7)
rubypants (0.2.0)
rubyzip (0.9.1)
ruport (1.6.0)
ruport-util (0.14.0)
ruwiki (0.9.3)
salted_login_generator (2.0.2)
shipping (1.5.1)
SimpleSearch (0.5.0)
sqlite3-ruby (1.2.1)
stemmer (1.0.1)
switchtower (1.0.1)
syntax (1.0.0)
systemu (2.2.0)
tagtools (0.0.3)
thin (1.2.5, 1.2.2)
thor (0.14.6, 0.14.4)
tidy (1.1.2)
treetop (1.4.9)
tzinfo (0.3.23)
unicode (0.1)
uuidtools (1.0.3)
webgen (0.4.7)
wee (0.10.0)
xhtmldiff (1.0.0)
xml-simple (1.0.11)
yajl-ruby (0.8.2)
ym4r (0.6.1)
youtube-g (0.4.9.9)

我有两个问题:

  1. 如何为我的项目创建一个真正的筒仓,一个真正空的 gemset?
  2. 如何消除本地 gems 中的“无效 gemspec”错误?因为如果我切换回 rvm use 1.8.7 然后运行 ​​gem list不会得到“无效的 gemspec”错误!

编辑

输入 rvm use ruby​​-1.9.2@MYGEMSET,然后运行 ​​which gem 指向 ~/.rvm/rubies/ruby-1.9.2- p290/bin/gem 我认为是正确的。

最佳答案

很可能发生这种情况是因为全局 gemset 包含所有 gem,请尝试:

rvm 1.9.2@global gem list

您可以将其与 gem 列表进行比较以仅查看您的 gem :

rvm use 1.9.2
diff --normal <(gem list) <( rvm 1.9.2@global gem list ) | sed '/^[^<]/ d ; s/^< //'

或仅使用 GEM_HOME 作为 GEM_PATH:

GEM_PATH=$GEM_HOME gem list

关于ruby - 为什么 RVM gem 列表显示我没有安装的 gem?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8887139/

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