0

I've installed Ruby via RVM in my virtual machine.

When I run rvm list I have Ruby 2.1.1 listed as both current and default. But when I run ruby -v my terminal tells me that ruby is not installed, and that I can install Ruby via apt-get.

What am I doing wrong?

toro2k
  • 19,020
  • 7
  • 64
  • 71
Krowar
  • 581
  • 2
  • 8
  • 18
  • If I remember how rvm works you have to tell him which ruby you want to use, something like `rvm use ` – mdesantis Apr 02 '14 at 07:23
  • Isn't it already in use when rvm list tells me that ruby 2.1.1 is default and current version? – Krowar Apr 02 '14 at 07:35
  • Yes, it should... I must say I've not been using rvm for years, so I just can suggest you another ruby versions manager, `rbenv`; I find it simpler and less problematic than rvm – mdesantis Apr 02 '14 at 07:46

1 Answers1

0

You might not be using the login shell. That could be the possible reason why you are unable to select ruby 2.1.1. Also, you won't have ruby installed in your system (not using RVM), that's why it is telling to install ruby.

Just reopen another terminal and try the below command from terminal and from your project folder to enter in to the log in shell (normally bash profile):

/bin/bash --login

After that, just run

rvm use ruby-2.1.1

You don't need to run this command every time you take the terminal. But, for that please refer this SO answer.

Hope it helps :)

Community
  • 1
  • 1
Rajesh Omanakuttan
  • 6,788
  • 7
  • 47
  • 85