rvm gemset list does not work properly #762

Closed
milosgajdos83 opened this Issue Feb 17, 2012 · 5 comments

3 participants

@milosgajdos83

when I create a new gemset and then list rvm gemset it does not report any gemsets in the chosen ruby. However if I run rvm gemset list_all, newly created gemset appears there. Please see the list of command below:

[gajdosm@host ~]$ rvm gemset create rails3
'rails3' gemset created (/home/gajdosm/.rvm/gems/ruby-1.9.3-p125@rails3).

[gajdosm@host ~]$ rvm gemset list

gemsets for system (found in /home/gajdosm/.rvm/gems/system)
*

[gajdosm@host ~]$ rvm use 1.9.3@rails3
Using /home/gajdosm/.rvm/gems/ruby-1.9.3-p125 with gemset rails3
[gajdosm@host ~]$ rvm gemset list

gemsets for system (found in /home/gajdosm/.rvm/gems/system)
*

[gajdosm@host ~]$ rvm gemset list_all

gemsets for ruby-1.9.3-p125 (found in /home/gajdosm/.rvm/gems/ruby-1.9.3-p125)
rails3

gemsets for ruby-1.8.7-p358 (found in /home/gajdosm/.rvm/gems/ruby-1.8.7-p358)
*

gemsets for ruby-1.9.2-p290 (found in /home/gajdosm/.rvm/gems/ruby-1.9.2-p290)
*

[gajdosm@host ~]$ rvm gemset create rails2.2
'rails2.2' gemset created (/home/gajdosm/.rvm/gems/ruby-1.9.3-p125@rails2.2).

[gajdosm@host ~]$ rvm gemset list

gemsets for system (found in /home/gajdosm/.rvm/gems/system)
*

[gajdosm@host ~]$ rvm gemset list_all

gemsets for ruby-1.9.3-p125 (found in /home/gajdosm/.rvm/gems/ruby-1.9.3-p125)
rails2.2
rails3

gemsets for ruby-1.8.7-p358 (found in /home/gajdosm/.rvm/gems/ruby-1.8.7-p358)
*

gemsets for ruby-1.9.2-p290 (found in /home/gajdosm/.rvm/gems/ruby-1.9.2-p290)
*

[gajdosm@host ~]$

@milosgajdos83

This has actually much bigger consequences - not sure if the above is interconnected with this but it would appear that you can't delete any gemset:

[gajdosm@host ~]$ rvm list

rvm rubies

ruby-1.8.7-p358 [ x86_64 ]
ruby-1.9.2-p290 [ x86_64 ]
=> ruby-1.9.3-p125 [ x86_64 ]

Default ruby not set. Try 'rvm alias create default '.

=> - current

=* - current && default

* - default

[gajdosm@host ~]$

[gajdosm@host ~]$ rvm gemset list_all

gemsets for ruby-1.9.3-p125 (found in /home/gajdosm/.rvm/gems/ruby-1.9.3-p125)
rails2.2
rails3

gemsets for ruby-1.8.7-p358 (found in /home/gajdosm/.rvm/gems/ruby-1.8.7-p358)
*

gemsets for ruby-1.9.2-p290 (found in /home/gajdosm/.rvm/gems/ruby-1.9.2-p290)
*

[gajdosm@host ~]$

[gajdosm@host ~]$ rvm gemset delete 1.9.3@rails2.2
/home/gajdosm/.rvm/gems/ruby-1.9.3-p125@1.9.3@rails2.2 already does not exist.
[gajdosm@host ~]$ rvm use 1.9.3@rails2.2
Using /home/gajdosm/.rvm/gems/ruby-1.9.3-p125 with gemset rails2.2
[gajdosm@host ~]$ rvm gemset delete rails2.2
/home/gajdosm/.rvm/gems/system@rails2.2 already does not exist.
[gajdosm@host ~]$ rvm gemset delete 1.9.3@rails2.2
/home/gajdosm/.rvm/gems/ruby-1.9.3-p125@1.9.3@rails2.2 already does not exist.
[gajdosm@host ~]$

@milosgajdos83

So by looking at the output above it looks there is something weird going on in getting the right path to the given gemset:

[gajdosm@host ~]$ rvm gemset delete rails2.2
/home/gajdosm/.rvm/gems/system@rails2.2 already does not exist.

this command looks immediately at the path to SYSTEM ruby despite the following - ie despite the fact that 1.9.3 ruby is being used - not the system one:
[gajdosm@host ~]$ rvm list

rvm rubies

ruby-1.8.7-p358 [ x86_64 ]
ruby-1.9.2-p290 [ x86_64 ]
=> ruby-1.9.3-p125 [ x86_64 ]

IF I however specify the complete gemset it tries to append it to the chosen ruby ie - see the path below:
[gajdosm@host ~]$ rvm gemset delete 1.9.3@rails2.2
/home/gajdosm/.rvm/gems/ruby-1.9.3-p125@1.9.3@rails2.2 already does not exist.
[gajdosm@host ~]$

@mpapis mpapis was assigned Feb 17, 2012
@repertoire

I am seeing this with ruby 1.9.2 on OS X 10.7. In my case, the gems are getting installed in the proper locations, within their gemset directories, but it would appear that the gemsets are not recognized, nor can the gems be found by the rails apps that need them. Thanks.

@mpapis
Ruby enVironment Manager member

@repertoire nature of this bug is only messing with listing/deleting gemsets, it has no influence on using gemsets or installing gems - at least it is not happening from what I can see.

you can check if using gemsets works with:

rvm use 1.9.3 --install
rvm gemset create test1
rvm gemset create test2
rvm gemset use test1
rvm current
rvm gemset use test2
rvm current
rvm gemset use test1
rvm current
@mpapis mpapis added a commit that closed this issue May 13, 2012
@mpapis mpapis fix gemsets listing, fix #762 c043485
@mpapis mpapis closed this in c043485 May 13, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment