Intalling Rails in windows activesupport requires Ruby version >= 2.2.2 - ruby-on-rails

I have a problem installing rails on my computer.
ruby -v
ruby 2.3.3p222 (2016-11-21 revision 56859) [x64-mingw32]
I get this error message :
ERROR: Error installing rails:
activesupport requires Ruby version >= 2.2.2.
How can I install rails?

You can try the installer
http://railsinstaller.org/en
For Windows
Make sure all required components are added to your path.
Try using a path editor software or Environment variable editor.

Related

Ruby version issue with ttfunk

While attempting to install asciidoctor-pdf (sudo gem install asciidoctor-pdf --pre) I'm getting the error ttfunk requires Ruby version ~> 2.1.
I've attempted to uninstall, reinstall, and update Ruby & Ruby gems multiple times and this message hasn't changed. Current ruby version states it's already at 2.1:
$ ruby version
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
Figured it out. For anyone who also has this issue in updating Ruby, I solved it by installing Ruby 2.3 manually following the instructions on https://www.softwarecollections.org/en/scls/rhscl/rh-ruby23/.

Bundle install doesn't work - Rubymine - (Gem::InstallError: activesupport requires Ruby version >= 2.2.2.)

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!
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
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.

cannot install latest Rails version on MacOS

I'm trying to install Rails 5 on my Mac (El Capitan).
When I type
gem install rails
I get this error message:
ERROR: Error installing rails:
activesupport requires Ruby version >= 2.2.2.
When I check my Ruby version with Rbenv:
rbenv global
2.3.1
however when I check my Ruby version like this:
ruby -v
I get
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin14]
how can I fix this, so when I want to install rails 5, it's using Ruby 2.3.1
Thanks for your help,
Anthony

Awesome_nested_set for ruby 1.8

Trying to install the awesome_nested_set gem for ruby 1.8.7 rails 2.3.8 environment
ERROR: Error installing awesome_nested_set:
activesupport requires Ruby version >= 1.9.3.
How do i check what version is compatible with 1.8.7 ?
Are there any other options for nested set structure ?
If you really need a historical version you can always install it with:
gem install awesome_nested_set -v x.x.x
Where x.x.x is an older version number. You can lock this down in your Gemfile as well.

Rails 4.0.0 install error

I am trying to set up a ruby on rails environment. But I don't understand the error I am seeing when trying to install rails 4.0.0 (below). How do I fix this?
ubuntu#ip-172-31-43-208:~/rails_project$ sudo gem install rails --version 4.0.0
ERROR: Error installing rails:
activesupport requires Ruby version >= 1.9.3.
ubuntu#ip-172-31-43-208:~/rails_project$ ruby -v
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux]

Resources