开发者

In RVM, gem list command does not show installed gems

开发者 https://www.devze.com 2023-04-12 18:05 出处:网络
In my rails application ruby -v ruby 1.9.2p180 (2011-02-18 revision 30909) [i686-linux] When I run rvm gemset list

In my rails application

ruby -v
ruby 1.9.2p180 (2011-02-18 revision 30909) [i686-linux]

When I run

rvm gemset list 

It specifies my gemset which i'm using

   global
=> blackapp

now i do bundle install and gems are installed successfully.when i do gem list, it shows * LOCAL GEMS * as empty.When i run rvm gem list it shows all the gems.So what could be the reason that gem li开发者_JAVA技巧st is not working.

I think I used bundle pack and that could be the reason as it shows .

 Your bundle is complete! It was installed into ./vendor/bundle

How to overcome this?


bundle install will install the gems to the vendor/cache directory within a rails app, which does not install them in the gems directory. To list the gems installed by bundler, use bundle list


use gem list --local instead of using gem list local


you also have to make sure you have selected your specific gemset you want the gems installed into. I see that you did this, but this is the number one reason for 'disappearing' gems. People forget to select the gemset prior to doing the install of gems, then end up installed in the 'default' gemset (which is used when no gemset is selected), and then they select their gemset and wonder why they're not there.

Also, do NOT use rvm to install to system. System rubies are NOT managed at ALL by RVm and the only reason why RVM supports

rvm use system

is simply to allow people to select the system ruby. RVM is not and will not be responsible for changes to the system ruby and its environment as this is usually managed by the OS's package manager. Using RVM to manage this is a Bad Idea(Tm) as a result.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号