Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 4788  / 3 Years ago, tue, june 22, 2021, 11:56:10

I have installed Ruby using RVM.



I did a gem install rspec command and it seemed to install rspec correctly. If I do a rspec I get a "The program 'rspec' is not currently installed" and I am suggested to apt-get it.



If I try to do a gem install rspec again, it shows that rspec was already installed. I tried to do sudo gem install rspec thinking it might be permission problem but then the terminal said that the gem program wasn't installed.



How can I run the programs I have "gem installed" in Ubuntu without resorting to doing an "apt-get"?


More From » ruby

 Answers
5

My problem was that the ruby version from my gem environment was different than from the ruby version from rvm.



I used the commands



gem env
which ruby


To diagnose the problem. This gave me the ruby version used by gem and rvm and then used



rvm use <ruby-version>


To match the two ruby versions.



I made a blog post with more details: Problems running the executable from a gem installed under rvm


[#38092] Wednesday, June 23, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ugeeport

Total Points: 181
Total Questions: 108
Total Answers: 99

Location: El Salvador
Member since Tue, Jun 29, 2021
3 Years ago
ugeeport questions
;