Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RVM global gemset confusion

Tags:

ruby

rvm

I'm using a gemset per project approach. Suppose I just installed RVM, created a gemset, called 'test' and install rails 3.1.0.rc4 there, which installs a bunch of gems. Now I switch to the global gemset (rvm gemset use global), and view my gems. I expect to see empty list, because I didn't install any gems into global gemset, but see all my gems from 'test' gemset. How is that?

My guess is that rvm gem list show all gems from all gemsets when invoked from global gemset. If so, how can I view only current gemset's gems?

like image 623
Valentin V Avatar asked Dec 27 '22 17:12

Valentin V


2 Answers

In common:

rvm <ruby version>@<gemset name> do gem list

For example:

rvm @test do gem list 

show that you want: gems on test gemset environment

Another way:

rvm use @test
gem list

show the same

like image 90
warpc Avatar answered Dec 30 '22 05:12

warpc


Use gem list instead of rvm gem list

like image 34
Ramiz Raja Avatar answered Dec 30 '22 07:12

Ramiz Raja