0

Rails newbie here , I am trying to test an opensource project that I downloaded but when I use bundle install I get the following error , which says that my ruby is 2.3 while in gemfile it is 2.4 (although I updated ruby & I have 2.4.0 using rbenv as shown below)

I have looked this up and tried multiple solution but couldn't solve it. I looked in the workspace for gem 'Ruby' but I didn't find it

Please advise. Thanks for your help.

usr@ubuntu:~/Downloads/instructure-canvas-lms-cea9158$ ruby -v
ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux]
usr@ubuntu:~/Downloads/instructure-canvas-lms-cea9158$ bundle install
Your Ruby version is 2.3.1, but your Gemfile specified 2.4.0
usr@ubuntu:~/Downloads/instructure-canvas-lms-cea9158$ rbenv local
2.4.0

==== This question is not duplicate of the other one referenced , I tried gem install bundler before posting the question and it didn't solve the issue , only when I used rbenv -rehash it was solved

Ahmed Elkoussy
  • 8,162
  • 10
  • 60
  • 85
  • show the content of Gemfile and the output of command `ls -la` from the project directory. – Roman Kiselenko Sep 06 '17 at 06:44
  • The gemfile is segregated to multiple files , however the issue turned out to be that after `gem install bundler` , I had to do `rbenv rehash` I appreciate your help. Thank you. – Ahmed Elkoussy Sep 06 '17 at 06:47
  • @Зелёный This question is not duplicate of the other one referenced , I tried `gem install bundler` before posting the question and it didn't solve the issue , only when I used `rbenv -rehash` it was solved , the Q & A referenced are not the same as this one – Ahmed Elkoussy Sep 06 '17 at 08:25
  • @Зелёный Please remove the duplicate flag as this question is **not answered** in the question referenced , they look similar but the answer is not the same. (Please search for `rehash` in both to check what I mean) – Ahmed Elkoussy Sep 10 '17 at 19:17

1 Answers1

-1

for the future reference for other developers:

2 commands solved the issue gem install bundler but only when I used rbenv rehash things worked

Ahmed Elkoussy
  • 8,162
  • 10
  • 60
  • 85