DEV Community

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

 
andy profile image
Andy Zhao (he/him)

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

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)

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

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 dev.to 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.