1

I am on Dreamhost shared hosting. I installed RVM to run Ruby 1.9.2, and created a empty gemset to work with. I ran gemset empty command on it to assure it's really empty.

Strangely, if I run rvm gemset use MYGEMSET followed by running rvm do gem list, I get a long list of gems that Dreamhost offers out of the box.

[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)

I have two questions:

  1. How do I create a real silo for my project, a gemset which is truly empty?
  2. How do I get rid of the "invalid gemspec" error in the local gems? Because if I switch back to rvm use 1.8.7 and then run gem list I don't get the "invalid gemspec" error!

EDIT

Typing rvm use ruby-1.9.2@MYGEMSET, then running which gem points to ~/.rvm/rubies/ruby-1.9.2-p290/bin/gem which I think is correct.

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
Felix Ogg
  • 852
  • 7
  • 23
  • What does `gem list` by itself say? Using `rvm do` is probably iterating through all the gems in all Rubys visible to RVM. See the "deprecated" warning in the output? Try `rvm help do` for more info. – the Tin Man Jan 20 '12 at 23:43

3 Answers3

2

rvm do gem list is deprecated

rvm gemset list: List your gemsets

rvm gemset create your_gemset: Create a gemset

rvm gemset use your_gemset: Use a gemset

gem list: List current gemset gems

Use rvm info to check that you are using the correct ruby and gemset. a best practice is to create a .rvmrc file

carpamon
  • 6,515
  • 3
  • 38
  • 51
  • 1
    deprecated true, but still `gem list` gives the wrong result :-) – Felix Ogg Jan 16 '12 at 22:36
  • 1
    yes, you are right. use rvm info to check that you are using the correct ruby and gemset. a best practice is to create a .rvmrc file. – carpamon Jan 16 '12 at 22:57
  • the comment was more helpful than the answer, so +1 and I edited it into your comment for future reference, a better planet, and world peace. – Felix Ogg Jan 20 '12 at 21:59
  • @FelixOgg, Do not edit people's answers to comment on the answer. Use the comment section below their answers. I rolled back your edit to tjarratt answer. Thank you. – the Tin Man Jan 20 '12 at 23:49
2

most likely this happens because the global gemset contains all the gems, try:

rvm 1.9.2@global gem list

you can compare this with gem list to see only your gems:

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

or using only GEM_HOME as GEM_PATH:

GEM_PATH=$GEM_HOME gem list
mpapis
  • 52,729
  • 14
  • 121
  • 158
  • not completely the right answer, but it helped me enough to resolve the problem. There was a GEM_PATH in my ~/.bash_rc and some other dot-files in my home dir, which I cleaned out. And voila, `gem list` now only shows the gems I installed, and Ruby 1.9 runs in clean environment. – Felix Ogg Jan 20 '12 at 21:53
0

I believe that rvm do gem list is going to list the gems for all your rubies (and all the gemsets). If you have rvm setup and sourced correctly, you should be able to use all of the shell scripts (ruby, gem, bundle, etc..) without prefixing them with rvm.

Try gem list after you use the correct ruby version + gemset (ie: rvm use ruby-1.9.2@MY_GEMSET). If that produces weird results, see which gem you're using with which gem.

tjarratt
  • 1,692
  • 9
  • 17