Ask A Question

Notifications

You’re not receiving notifications from this thread.

rvm vs rbenv

ken mcfadden asked in General

Hi Chris...My 2012 iMac GPU gave out and its not worth fixing..I am awaiting my new imac 27 5k.

I have been using rvm for years most because I like when you download an example app to learn from most of the time it does not have all the same gem versions/rails etc as what you currently happen to have on your machine.

Like i said i am getting a new machine and I will have to set up my environment from scratch. I saw you had a post for that.

Can you expound on why you use rbenv...I have read some articles pro and con...that it does not use gemsets but bundler will handle that but its confusing.

Where do u stand on rbenv vs rvm and why.

(ps..I am self studying rails(I am an old time iseries programmer) and I will began subscribing to your service once I get my new mac set up thanks)

Reply

Bundler handles all that for you, so gemsets don't do anything these days. Your Gemfile dictates the versions for each gem, so as long as you have a Gemfile for your apps, you're set. It won't even attempt to load other gem versions.

Gemsets from rvm are from back in the early, early Ruby days when Bundler didn't exist. There was not a good way of keeping track of gem versions, so they introduced that to help. It hasn't been necessary since then.

I personally use rbenv because it's less intrusive. Rvm will override methods in your bash prompt and rbenv does not. There can be conflicts that come up and cause problems, and rvm is a bit harder to set up in production. I've ended up doing some complex things with Ruby (like building Rails hosting with Hatchbox.io), so having a simpler ruby version manager like rbenv comes in handy for things like that.

You're free to use rvm if you like. You probably don't have too much of a reason to switch, so don't worry much about it.

Reply

Yes thanks Chris I just also found a really good article on having multiple versions of rails.

  1. Have a gem file with the rails version u want(or other gems)
  2. use bundle exec

I think I will make the switch see u soon thanks again.

Reply

totally weird from the bundler.io site :
How to use Bundler with Rails
Install Rails as you normally would. Use sudo if you would normally use sudo to install gems.
$ gem install rails
**We recommend using rvm for dependable Ruby installation
s, especially if you are switching between different versions of Ruby

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 81,842+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

    © 2024 GoRails, LLC. All rights reserved.