I have Ruby 2.3.0 installed in my system. The output of ruby -v
is:
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]
When I try to run Rails using:
bundle exec rails new ~/my-test-app --dev
I get the following error:
Your Ruby version is 2.1.7, but your Gemfile specified 2.3.0
I have both Ruby versions installed. How to make bundle use Ruby 2.3.0 instead of 2.1.7
TL;DR Change the version of Ruby from 2.1 to 2.3 in /usr/local/bin/bundle.
Explanation
To figure out which Ruby bundler is using enter
which bundle
This should print
/usr/local/bin/bundle
Now open the file and change the Ruby version from 2.1 to 2.3
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With