Question

I have Rails application that I've cloned from github:

https://github.com/RailsApps/rails3-devise-rspec-cucumber

When I run bundle, a new gemset rails3-devise-rspec-cucumber is created.

  1. Could you please explain, why that particular application forces rvm to create a gemset, while any other application won't do it?

  2. How can I prevent application from creating a gemset and force it to use the global gemset?

Thank you!

Was it helpful?

Solution

Take a look at the list of files in the repo you linked. You should see two files named .ruby-version and .ruby-gemset. The latter is what RVM is using to determine the gemset to be used.

Personally, I wouldn't recommend changing the gemset simply because any gems that this application installs will essentially be contained to that one gemset, and will not affect any others (keeps things nice a tidy too).

However if you do wish to change this behaviour, you can either edit the .ruby-gemset file and change the rails3-devise-rspec-cucumber line to global instead, or in your command line, simply do rvm gemset use global.

Note that the latter solution is only temporary, and the moment you reload that directory, rvm will point right back to whatever gemset is indicated in the .ruby-gemset file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top