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/.
Related
My installation of Rails seems to be using a different version of Ruby from the version of Ruby on the rest of my system:
$ rails --version
Rails 5 requires Ruby 2.2.2 or newer.
You're running
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
Please upgrade to Ruby 2.2.2 or newer to continue.
$ ruby --version
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]
Why is this? I installed Rails with sudo gem install rails. I'm on OSX and don't remember how I installed Ruby.
Mac OSX comes ruby installed as default. If you need more late versions of ruby, you need to follow this guide: http://railsapps.github.io/installrubyonrails-mac.html
While attempting to solve another issue identified in this thread:
Error while trying to load the gem 'devise. ActiveSupport: Duration can't be coerced into Integer, I followed the suggested solution and changed my ruby version from 2.4.1 to 2.3.3 using rbenv. I also made similar changes in my Gemfile to reflect the new ruby version. However, when I tried to bundle install again, it throws an error saying that my ruby version is 2.4.1, when my Gem specified 2.3.3. However, running ruby -v shows my ruby version is on 2.3.3.
$ bundle install
Your Ruby version is 2.4.1, but your Gemfile specified 2.3.3
$ ruby -v
ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-darwin16]
Any help here would be appreciated. Thank you!
Gem installation is specific to ruby version, so the bundler you're using is likely installed to your old ruby. Try installing bundler again:
gem install bundler
That should fix your problem.
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.
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
I've attempted to install Rails 4.2.0.beta1 (released Aug 20, 2014). I get an error "Unresolved dependency found during sorting." Here are the details:
$ ruby -v
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0]
$ gem -v
2.4.1
$ gem install rails --pre
ERROR: While executing gem ... (Gem::DependencyError)
Unresolved dependency found during sorting - activesupport (>= 4.0)
(requested by sprockets-rails-3.0.0.beta1)
How can I install Rails 4.2.0.beta1?
You are using RubyGems 2.4.1:
$ gem -v
2.4.1
there's a bug with the newest 2.4.1 release of RubyGems (the system gem) that makes it difficult to install Rails 4.2.0.beta1. See Rails issue 16609.
You can work around the problem by downgrading to the 2.2.2 version of RubyGems.
$ gem update --system 2.2.2
Updating rubygems-update
Fetching: rubygems-update-2.2.2.gem (100%)
Successfully installed rubygems-update-2.2.2
Installing RubyGems 2.2.2
RubyGems 2.2.2 installed
Now you will be able to install Rails 4.2.0.beta1.
If you are using RVM, and you want to use two different versions of the RubyGems system gem, you'll need to install two different versions of the latest Ruby 2.1.2 release with different RVM names. For example, if you already have Ruby 2.1.2 installed with the newest RubyGems 2.4.1, you can install another version of Ruby 2.1.2, giving it a different name:
$ rvm install ruby-2.1.2-oldrubygem
RubyGems 2.2.2 is installed by default with the current Ruby 2.1.2 release:
$ ruby -v
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0]
$ gem -v
2.2.2
You'll be able to install Rails 4.2.0.beta1.
This issue has been fixed on RubyGems. Upgrade to at least 2.4.4
Have a look at this GitHub issue for more information.