Reputation: 1
I am doing a project in Rubymine and I get a notice that I need to install some gems. When I do the bundle install I get the following error:
Gem::InstallError: activesupport requires Ruby version >= 2.2.2. An error occurred while installing activesupport (5.1.0), and Bundler cannot continue. Make sure that
gem install activesupport -v '5.1.0'
succeeds before bundling.Process finished with exit code 5
I am using version 2.4.0 of Ruby, so I do not understand why I get this error.
Thanks for the help!
Upvotes: 0
Views: 1865
Reputation: 1
This worked for me when I updated my Ruby version to the latest 3.2.2, the latest available (presently). Use "rbenv install --l" to check for the latest version.
`brew install rbenv ruby-build
rbenv init
eval "$(rbenv init - zsh)"
rbenv install --l
rbenv install 3.2.2
rbenv global 3.2.2
'
Upvotes: 0
Reputation: 17612
Rubymine has nothing to do with this.
As @Sunny commented out you need to make sure the ruby version you are using. I recommend you to create a new file on the app root directory, name it .ruby-version
and inside add the ruby version you want ruby-2.4.0
(you can always modify it later and set a different versions).
Also you might want to use a ruby version manager like rvm
or rbenv
both are good, on my personal preference I use rbenv
for development and rvm
for production environments. You can follow this guide, feel free to change the OS and the ruby manager as you prefer.
Upvotes: 0
Reputation: 1440
First check your ruby version.
$ which ruby
/Users/.rvm/rubies/ruby-2.1.2/bin/ruby
$ ruby --version
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0]
Use the Ruby 2.4 version instead...
rvm install 2.4
rvm use 2.4
Upvotes: 2