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?
RVM includes a built-in Ruby installation mechanism while Rbenv does not. Rbenv main sell point is that its lightweight in comparison with RVM, while still providing just enough functionality for the Ruby development.
There are basic Rbenv commands that you are going to use at some point of Ruby development: rbenv install <version> installs given Ruby version, rbenv global <version> sets the default system Ruby version, rbenv version displays the currently used Ruby version of your system,
The other known option is called rbenv. It’s a much more simpler and reliable solution, and it does not mess the system up, keeping everything local and manageable. RVM and its downsides
rvm use default <version> sets the Ruby version that your system uses by default The last two commands are useful to remember whenever you start the development of a new Ruby-written program. In most cases, it's best to use the latest stable version, which is always installable via the rvm install ruby --latest command.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With