I'm trying to use Travis-CI with a new Ruby on Rails project I just started a few days ago. I've tried updating Travis-CI to update rubygems in before_install but still no luck.
Gem::InstallError: rack requires Ruby version >= 2.2.2.
Installing nio4r 1.2.1
An error occurred while installing rack (2.0.1), and Bundler cannot continue.
Make sure that `gem install rack -v '2.0.1'` succeeds before bundling.
Edit your .travis.yml:
rvm:
- 2.2.2
(or whatever the latest stable is).
Related
While commanding"Bundle Install " in git bash,I am finiding this error "Gem::InstallError: byebug requires Ruby version >= 2.4.0.
An error occurred while installing byebug (11.1.3), and Bundler cannot continue.
Make sure that gem install byebug -v '11.1.3' --source 'http://rubygems.org/'
succeeds before bundling."
How can I solve the problem??Need the help badly.
In Gemfile:
byebugGem
You need to either upgrade your Ruby version to 2.4.0 or higher, or drop your byebug version down to something that's compatable with your Ruby version.
I am on Windows and running Ruby 2.7.0.
When running gem install rails I get this error:
ERROR: Error installing rails:
The last version of nokogiri (>= 1.6) to support your Ruby & RubyGems was 1.10.9.
Try installing it with `gem install nokogiri -v 1.10.9` and then running the current command again
nokogiri requires Ruby version >= 2.3, < 2.7.dev. The current ruby version is 2.7.0.0.
When I run gem install nokogiri -v '1.10.9' I get the same exact error.
I have installed gem install nokogiri -v 1.11.0.rc1 --pre , but I'm still getting the same errors.
$ nokogiri -v
# Nokogiri (1.11.0.rc1)
---
warnings: []
nokogiri: 1.11.0.rc1
ruby:
version: 2.7.0
platform: x64-mingw32
description: ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x64-mingw32]
engine: ruby
libxml:
source: packaged
patches:
- 0001-Revert-Do-not-URI-escape-in-server-side-includes.patch
- 0002-Remove-script-macro-support.patch
- 0003-Update-entities-to-remove-handling-of-ssi.patch
- 0004-libxml2.la-is-in-top_builddir.patch
compiled: 2.9.10
loaded: 2.9.10
libxslt:
source: packaged
patches: []
compiled: 1.1.34
loaded: 1.1.34
So, I understand that Ruby 2.7.0 is later than 2.7.dev, but I have the nokogiri gem installed.
Also, everything was working fine with Ruby 2.6.5. I did uninstall it, remove it from the Path, and restart my machine.
If anybody has any ideas I would love to hear them.
It seems that when you are trying to install nokogiri it installs a version which is not compatible with your ruby version and shows that error.
Even when you specify the version to install, it'll ignore the version number specified and install the latest one as shown in your error.
$ nokogiri -v
# Nokogiri (1.11.0.rc1)
---
warnings: []
nokogiri: 1.11.0.rc1
So try to make the gem makes the download itself for the currently installed ruby version.
gem install nokogiri --platform=ruby
PS This could take a while...
After over a year of not touching a Rails app, I updated all gems and tried to deploy again.
I get this error:
Installing sassc 2.0.1 with native extensions
Gem::InstallError: sassc requires Ruby version >= 2.3.3.
Using rb-inotify 0.10.0
Using mime-types 3.2.2
Using coffee-script 2.4.1
Using compass-core 1.0.3
Using compass-import-once 1.0.5
Using sdoc 1.0.0
Using slim 4.0.1
Using validates_timeliness 4.1.1
Using validates_email_format_of 1.6.3
Using activesupport 5.2.3
Using loofah 2.2.3
Using axlsx 2.1.0.pre from https://github.com/randym/axlsx.git (at c8ac844#c8ac844)
Installing mobility 0.8.7
Gem::InstallError: mobility requires Ruby version >= 2.3.7.
Using css_parser 1.7.0
An error occurred while installing sassc (2.0.1), and Bundler cannot continue.
Make sure that `gem install sassc -v '2.0.1'` succeeds before bundling.
! ERROR: Deploy failed.
-----> Cleaning up build
Unlinking current
OK
Connection to XXX closed.
! Run Error
So the Ruby version used by Mina is too old (< 2.3.7).
Interestingly, when I log into the server, I see that RVM has installed Ruby 2.4.1:
$ rvm list
rvm rubies
ruby-2.2.5 [ x86_64 ]
ruby-2.3.1 [ x86_64 ]
=* ruby-2.4.1 [ x86_64 ]
After taking a closer look at Mina's output, I see:
Warning: the running version of Bundler is older than the version that created the lockfile. We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
I wonder which Ruby version Mina is using? And how can I tell it to use the same version that the Rails-app uses on the server?
I'm in contact with the server support, and they are asking:
How does mina concretely work? Is this done locally or remotely on our system?
I don't know what to answer, I'm a "simple" Rails programmer with not much experience in deploying apps. It used to work perfectly a year ago, now it doesn't do anymore.
Thanks for any help.
After a system upgrade to macOS 10.14 I am suddenly unable to install Rails 3.2.5 on Ruby 1.8.7, since a new gem is required now: Concurrent-ruby.
I was able to install and use this system on macOS 10.13. Why is concurrent-ruby suddenly a requirement? How can I find a way to get on without it?
I found a solution.
I used to install some gems before installing Rails 3.
These were:
rdoc-data -v 3.12
i18n -v 0.6.11
execjs -v 1.4.0
rack-cache -v 1.2
rails -v 3.2.5
I found out that I had to install
rack -v 1.4.7
before installing
rack-cache -v 1.2
Now I am again able to install Rails 3.
Somehow the install process must have loaded the requirements for a newer version of i18n, since later versions of this gem require concurrent-ruby.
Rails 3.2.5 on Ruby 1.8.7? Do you need that old versions?
I have actually 3 errors in Travis CI:
Here are the logs:
1:
Gem::InstallError: rack requires Ruby version >= 2.2.2.
Installing erubis 2.7.0
An error occurred while installing rack (2.0.1), and Bundler cannot continue.
Make sure that `gem install rack -v '2.0.1'` succeeds before bundling.
The command "eval bundle install --jobs=3 --retry=3 --deployment" failed. Retrying, 2 of 3.
I installed `gem install rack -v '2.0.1' but I did not help.
Also I changed my travis.yml file so it is
rvm:
- 2.2.2
instead of:
rvm:
- 2.2
2:
Gem::InstallError: rack requires Ruby version >= 2.2.2.
Installing websocket-driver 0.6.4
An error occurred while installing mime-types-data (3.2016.0521), and Bundler
cannot continue.
Make sure that `gem install mime-types-data -v '3.2016.0521'` succeeds before
bundling.
I installed `mime-types-data -v '3.2016.0521' but I did not help.
3:
Searching for binary rubies, this might take some time.
Requested binary installation but no rubies are available to download, consider skipping --binary flag.
Gemset '' does not exist, 'rvm rbx-2 do rvm gemset create ' first, or append '--create'.
The command "rvm use rbx-2 --install --binary --fuzzy" failed and exited with 2 during .
My travis.yml:
language: ruby
rvm:
- 2.2.2
- jruby
- rbx-2
before_install:
- gem update
- gem --version
before_script:
- psql -c 'create database listapp_test;' -U postgres
addons:
postgresql: '9.3'
I tried to update racks but I didn't help.
Ruby ver: ruby 2.2.4.p230
Does anyone know how to fix it?
Sounds like you are installing gem in places that Bundler cannot find it. It is much easier if you post build log URL that shows the problems you are having.
Note that Travis CI cannot support Rubinius on Precise any longer (issue #3 above) due to https://github.com/rubinius/rubinius/issues/3717. Try using Trusty instead.