How do I uninstall the old ruby versions and how do can I update to GemFile to 2.4.2?
Sandys-MacBook-Pro:roughhouse-web sandychow$ bundle install Your Ruby version is 2.4.2, but your Gemfile specified 2.2.5 Sandys-MacBook-Pro:roughhouse-web sandychow$ rvm list
rvm rubies
ruby-2.1.5 [ missing bin/ruby ] ruby-2.2.5 [ missing bin/ruby ] * ruby-2.4.1 [ x86_64 ] => ruby-2.4.2 [ x86_64 ]
To specify a Ruby version in your Gemfile, simply include the version towards the top:
For Ruby 2.4.2, you can do this:
# Gemfile
source "https://rubygems.org"
ruby "2.4.2"
# ... your gems on the following lines ...
If you want to uninstall a Ruby version, execute:
$ rvm uninstall <version_number>
So to uninstall version 2.2.5, execute:
$ rvm uninstall 2.2.5
Note: don't include the $
sign. That's just there to represent your terminal window.
More information on specifying Ruby versions in your Gemfile can be found at these links:
If you still experience issues, you may need to install or update bundler
:
$ gem install bundler
or
$ gem update bundler
As your Gemfile specified ruby 2.2.5 and your rvm ruby version is 2.4.2, you can simply update the project gems bundle to fix the issue by doing
bundle update
This will update all the gems in your Gemfile file to get compatible with your current ruby version.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.