Gem::InstallError: byebug requires Ruby version >= 2.4.0 - ruby-on-rails

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.

Related

Travis Running Gem Install Bundler Without Version

Travis is running the the command below and throwing an error:
$ gem install bundler
217ERROR: Error installing bundler:
218 The last version of bundler (>= 0) to support your Ruby & RubyGems was 2.3.26. Try installing it with `gem install bundler -v 2.3.26`
219 bundler requires Ruby version >= 2.6.0. The current ruby version is 2.5.0.
Now I don't know who told it to do that when I have the following in the .travis file:
before_install:
- gem install bundler -v 2.3.26
What could be causing travis to behave like this?

Bundler can't install signet

I've just removed rbenv as i wanted to install a newer Ruby version (2.6) than the ones available for rbenv, then installed Ruby 2.6, that went fine, now while trying to reinstall all the gems for my app I ran into the following problem:
$ bundle install
Installing signet 0.14.0
Gem::InstallError: signet requires Ruby version >= 2.4.0.
An error occurred while installing signet (0.14.0), and Bundler cannot continue.
Make sure that `gem install signet -v '0.14.0' --source 'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
google_drive was resolved to 2.1.12, which depends on
google-api-client was resolved to 0.21.2, which depends on
googleauth was resolved to 0.6.7, which depends on
signet
But ruby has clearly been upgraded:
$ ruby -v
ruby 2.6.6p146 (2020-03-31 revision 67876) [x86_64-linux-gnu]
and if I try to install signet manually it works fine:
gem install signet -v '0.14.0' --source 'https://rubygems.org/'
Successfully installed signet-0.14.0
Parsing documentation for signet-0.14.0
Done installing documentation for signet after 0 seconds
1 gem installed
But then if i run bundle install again I still get the same problem. I've also tried bundle install --path vendor/cache and bundle install --system to no avail.
Note that the gems seem to install in the right place:
gem which signet
/var/lib/gems/2.6.0/gems/signet-0.14.0/lib/signet.rb
if I compare it to another one installed by bundler:
gem which multi_json
/var/lib/gems/2.6.0/gems/multi_json-1.14.1/lib/multi_json.rb
This is on Ubuntu 16.04.4 LTS and bundler 1.16.3
How do I fix this?
So I've finally figured it out, installing a newer version of bundler (but < 2.0 as Rails 4.2 requires it) did the trick, although i also had to uninstall the ruby 2.2-dev package and install the 2.6-dev package to be able to compile native gems like nokogiri, then running the whole thing specifying the bundler version.
For those interested, these were the commands:
apt-get remove ruby-dev
apt install ruby2.6-dev
gem install bundler -v 1.17.3
bundle _1.17.3_ install

gem install does not install rails

I have this version of ruby:
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x64-mingw32]
How do I solve 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.
Currently (04-02-2020) Ruby 2.7.0 on Windows is only supported in the latest release candidate of nokogiri, see their git repo.
You can (install pre-releases)[https://guides.rubygems.org/patterns/#prerelease-gems] with the --pre flag of gem:
gem install nokogiri --pre

ruby on rails rails new error gem install ffi -v

good day
Today starting to study ruby on rails I find this error when creating a new application
/Users/Manux/.rvm/gems/ruby-2.1.1/extensions/x86_64-darwin-14/2.2.0-static/ffi-1.9.17/gem_make.out
An error occurred while installing ffi (1.9.17), and Bundler cannot
continue.
Make sure that gem install ffi -v '1.9.17' succeeds before bundling.
I use ruby-2.1.1 and rails 5.0.1

An error occurred while installing json (1.7.6), and Bundler cannot continue.

An error occurred while installing json (1.7.6), and Bundler cannot continue.
Make sure that gem install json -v '1.7.6' succeeds before bundling.
Might be your existing Ruby version does not support the gem. Use the gems that support by your Ruby version. If yours Ruby version is higher than 2.1.0 then degrade it to 2.1.0 then it works fine.
You have to update your ruby installation . Which version it is ?
check it from terminal , try
ruby -v

Resources