I traditionally have used rbenv for all my personal projects on my personal laptop without issue and like it. However I need to start working with a codebase (rails) at work and we use rvm on all our work laptops. Is there any way to get rvm and rbenv to live happily together or should I be able to bootstrap the app without rvm and just use rbenv to manage the local ruby for this repo?
Asked
Active
Viewed 4,229 times
10
-
1A VM like VirtualBox? Docker? – Eric Platon Mar 04 '16 at 23:57
-
Yeah I'm running a docker container in the meantime, but it would be nice to be able to bootstrap this app on my personal laptop. Saves having to lug two laptops around. – nulltek Mar 05 '16 at 00:00
-
What is the hard constraint on using RVM at work? Are there some kind of custom scripts that make RVM compulsory? If not, I think you should be able to use Rbenv on you personal machine. After all RVM and Rbenv are just two tools to do roughly the same job: Managing Ruby installs. This should have nothing to do with the application code, except if custom scripts depend on one of the tools. In which case it is way less painful and time-consuming to use that tool, here RVM. – Eric Platon Mar 05 '16 at 02:08
-
Just saw B Seven's answer. My last comment is in tune with his answer. – Eric Platon Mar 05 '16 at 02:11
2 Answers
4
You can't really have rbenv and rvm coexist. With rvm, it overrides the 'gem' command, so that would make rbenv useless.
If you want to use rbenv for both, you'd have to avoid using gemsets and instead use bundler to handle dependencies. But it seems like rvm is a hard constraint, so perhaps move personal work to rvm.

Stephen Grimes
- 398
- 1
- 7
3
Use rbenv to manage the local ruby for the app.
I used to use RVM but switched to rbenv. I have had no problems. rbenv has advantages over RVM. Unless they are using some special feature that rbenv doesn't support, you should be able to work with rbenv.

B Seven
- 44,484
- 66
- 240
- 385