DEV Community

Discussion on: open source help/discussion thread (v0)

s_awdesh profile image
Awdesh • Edited on

Thanks Andy. I did a reinstall of rbenv and ran below.

❯ ruby -v

ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin15]

❯ rbenv version
2.5.1 (set by RBENV_VERSION environment variable)

❯ rbenv shell 2.5.1

still see the same issue.

❯ bundle install
Your Ruby version is 2.0.0, but your Gemfile specified 2.5.1

Thread Thread
andy profile image
Andy Zhao (he/him) Author

Ah, your bundle install might be running from your old Ruby version as opposed to the latest one.

Try running which gem and which bundle. You should be seeing something similar to this output:

which gem
#=> /Users/username/.rbenv/shims/gem
:which ruby
#=> /Users/username/.rbenv/shims/ruby
:which bundle
#=> /Users/username/.rbenv/shims/bundle

If it's different, you'll probably see that bundle or gem are running from different paths than ruby.

Thread Thread
s_awdesh profile image
Awdesh • Edited on

That did it. Thanks for the tip.

gem and ruby paths were same but bundle. I updated the PATH for bundle gem file using BUNDLE_GEMFILE

export BUNDLE_GEMFILE=/Users/awdesh/.rbenv/shims/bundle

restarted terminal

bundle install  #worked.
Thread Thread
andy profile image
Andy Zhao (he/him) Author

Awesome! Glad to know it worked. From my experience, it's "cleaner" to reinstall your gems per version, but I'm not too sure if it matters too much.

Thread Thread
co16353sidak profile image
Sidak Singh Aulakh • Edited on

Hey, I am currently working on some night mode bugs and my work mainly works on editing scss/css files,
nevertheless I want to run a local setup of the application in an attempt to check the changes I am making.
I am having the same error as above only that required ruby version 2.6.1 but it seems to be picking up 2.3.7 from my system macOS
I have followed all the steps but to no use, I have little to no experience in ruby. could use your help in the same.