Ruby developers on Linux, what's your preferred Ruby?

@passthejoe I use system ruby by default, and chruby+ruby-install when I need a specific ruby for an app/library/project.

@postmodern For now I got rid of all the distro-supplied gems. I'll try rbenv soon -- I used it on my last OS (CentOS Stream) but not since I've been on Fedora.

@passthejoe Fedora's rubygems package is nice since they patched it to install gems into ~/.gem/ for normal users, so you don't have to run `sudo gem install` for all gems.

@postmodern I never know if I'm supposed to do 'sudo gem install' or just 'gem install'. Do they go to the same place, or does sudoing put it somewhere else?

@passthejoe check `sudo gem env` vs `gem env`. Installing a gem via sudo causes it to go into /usr/local/share/gems (which is global), where as non-sudo gem install goes into ~/.gem/ (which is local to the user).

@postmodern Thank you for this. I imagine I could remove the globals and then reinstall as local.

@postmodern But I guess I should figure out Bundler, or something similar.

@passthejoe bundler is for when you need to isolate and lock down the gem dependencies of an app or library.


@postmodern @passthejoe But it also makes it a lot easier to keep a whole bunch of gems up to date, or to install them on a new machine. If you want to give your code to someone else, it's pretty much standard for that reason. They just type "bundle install".

Sign in to participate in the conversation

A Mastodon instance for Rubyists & friends