Questions tagged [rbenv]

a simple version manager for Ruby, with a plugin system to modify its behaviour.

rbenv (downcased) is a tool to allow you to switch between multiple versions of Ruby. It's simple, unobtrusive, and follows the UNIX tradition of single-purpose tools that do one thing well.

Download

Useful plugins

Documentation

See Also

1170 questions
45
votes
3 answers

rbenv: Surviving without gemsets

TL;DR Don't bother with gemsets; multiple versions of a gem may be installed concurrently. When necessary, specify which version to execute using $ gem-based-binary _version_ args notation. Use bundle exec when you have a Gemfile specifying the…
Noach Magedman
  • 2,313
  • 1
  • 23
  • 18
36
votes
8 answers

rails rbenv: rails: command not found

I have recently moved from RVM to Rbenv and when attempting to execute rails I am getting an error like the one below Pauls-Air:~ $ rails rbenv: rails: command not found The `rails' command exists in these Ruby versions: 2.1.2
Boss Nass
  • 3,384
  • 9
  • 48
  • 90
35
votes
5 answers

How to run a Ruby script using rbenv with cron

I'm trying to run a Ruby script using rbenv with cron. I know that I need to load rbenv in order to have the right Ruby version loaded. I've tried options like this: */10 * * * * /bin/bash -c 'source $HOME/.bashrc; cd /data/app; ruby -v' >>…
kmmndr
  • 884
  • 1
  • 7
  • 8
34
votes
7 answers

Install older Ruby versions on a M1 MacBook?

Installing Ruby 3.0.x works fine on M1 MacBooks using rbenv or asdf. But older versions like 2.7.x and 2.6.x are having various issues. How do I fix them, without installing both x86 and ARM versions of homebrew at the same time?
orthodoX
  • 992
  • 1
  • 8
  • 17
33
votes
3 answers

How do you use multiple rails versions with rbenv?

Is it possible to use multiple versions of rails using rbenv (e.g. 2.3 and 3.1)? This was easy with gemsets in rvm, but I'm wondering what the best way is to do it now that I've switched to rbenv (also, I'm looking for a way to do it without…
aciniglio
  • 1,777
  • 1
  • 16
  • 18
31
votes
4 answers

bundle uses wrong ruby version

I'm trying to run env RAILS_ENV=test bundle exec rake db:migrate and get the following error Your Ruby version is 2.1.7, but your Gemfile specified 2.2.3 ruby -v gives me ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin15] I'm using…
Linus
  • 4,643
  • 8
  • 49
  • 74
31
votes
8 answers

rbenv can't change global ruby version

My Mac OS X has a default ruby. $ ruby -v ruby 2.0.0p451 (2014-02-24 revision 45167) [universal.x86_64-darwin13] I installed rbenv and ruby version 2.1.2. $ rbenv versions system * 2.1.2 (set by /Users/sdw/.rbenv/version) and I tried to set the…
qodot
  • 401
  • 1
  • 4
  • 16
27
votes
7 answers

rbenv: ruby: command not found

I am using rbenv with ruby version 1.9.1-p378 on the local dir. Command ruby -v gives the following error: rbenv: ruby: command not found The `ruby' command exists in these Ruby versions: 2.0.0-p353 Any clue why this happens? The bundle, rails…
Lawrence DeSouza
  • 984
  • 5
  • 16
  • 34
26
votes
7 answers

Installing openssl in ruby / rbenv

I need to use openssl in ruby. How should I install the same? I've installed ruby through rbenv, and am using ubuntu 12.04. kprakasam@ubuntu:~$ ruby -v ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux] kprakasam@ubuntu:~$…
Kowshik
  • 1,541
  • 3
  • 17
  • 25
25
votes
3 answers

rbenv: no such command "install" even though ruby-build is installed

I'm trying to get ruby 2.1.4 installed via rbenv for a client project. Though previously I've been able to install ruby versions through rbenv, after upgrading to Yosemite, I keep getting the following error: rbenv: no such command 'install' After…
Danny Cox
  • 253
  • 1
  • 3
  • 6
25
votes
3 answers

Installing Ruby using rbenv on Ubuntu 14.04 virtualbox hangs

I'm trying to get the Ruby on Rails running on Ubuntu 14.04. The Ubuntu is installed on VirtualBox. I'm following https://gorails.com/setup/ubuntu/14.04 When I run the command rbenv install 2.1.2 Ruby keeps installing forever. I waited for more…
pravin
  • 1,106
  • 1
  • 18
  • 27
24
votes
3 answers

reinstall every gem for each ruby version?

I just installed Ruby 2.0.0 using rbenv and set it to the global ruby version for my system. Since 2.0 is compatible with 1.9.3, I tried to start up a Rails project with it, but got the following error. I did rbenv rehash after installing 2.0 The…
BrainLikeADullPencil
  • 11,313
  • 24
  • 78
  • 134
23
votes
10 answers

Nokogiri error when running bundle install

Trying to get a cloned Rails app running. When running bundle install I get this error: Using mini_portile (0.5.0) Installing nokogiri (1.6.0) Gem::InstallError: nokogiri requires Ruby version >= 1.9.2. An error occurred while installing nokogiri…
wikichen
  • 2,253
  • 3
  • 18
  • 28
22
votes
4 answers

Ruby: LoadError - library not found for class Digest::SHA1 -- digest/sha1

When running pod install it runs into a problem when installing yoga. Seems to be a problem with my ruby environment? $ pod install Analyzing dependencies Fetching podspec for `Folly` from…
Peter G.
  • 7,816
  • 20
  • 80
  • 154
22
votes
2 answers

rbenv build failed on Ubuntu 14.04

I've successfully installed rbenv (along with the build tools) on my Ubuntu 14.04 desktop, and that appears to be working fine, but as soon as I try to install ruby 2.1.1, the build fails: daniel@grape:~$ rbenv install 2.1.1 Downloading…
Daniel Hollands
  • 6,281
  • 4
  • 24
  • 42
1
2
3
77 78