public_suffix requires Ruby version >= 2.3 while installing fastlane - ruby

Getting following error public_suffix requires Ruby version >= 2.3. while installing fastlane
i am using ruby 3.0
ruby -v
ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-linux]
Installing fastlane
sudo gem install fastlane
getting below error
ERROR: Error installing fastlane:
public_suffix requires Ruby version >= 2.3.

https://github.com/weppos/publicsuffix-ruby/blob/v4.0.6/public_suffix.gemspec#L23
specifies that public_suffix requires a ruby version >= 2.x - so I believe that it will not, unfortunately, permit 3.x as a dependency.
See In a ruby .gemspec file, how do I specify multiple versions of a dependency?
This is something that needs to be done by the gem maintainer. It's also a fanstastic example of dependency hell in the wild.

Related

Which version of Ruby is mintiest 5.14.1 gem compatible with?

When I run:
$ bundle install
I get this response:
Fetching gem metadata from https://rubygems.org/.........
minitest-5.14.1 requires ruby version ~> 2.2, which is incompatible with the
current version, ruby 3.0.0p0
I only have ruby 3.0.0p0 installed.
minitest gem page says:
Required ruby version >= 2.2, < 4.0
I assume this means anything up to Ruby 3.0.0p0 is compatible. However, that isn't what the error message says.
Not sure if this is a solution. I'd call it more of a work around.
Install ruby version 2.7.2
Update .ruby-version file in Jekyll to 2.7.2
That's it :)
Ideal solution would include identifying why Jekyll was dependent on minitest-5.14.1 (when only 5.14.4 was installed based on gem list).

Can't install bundler, shows version too old

I am trying to install wpscan to my system, but it shows an error to the ruby version for some reason, however it is sufficient for this install(>=2.3.0)
Error:
[root#ds wpscan]# gem install bundler
ERROR: Error installing bundler:
bundler requires Ruby version >= 2.3.0.
[root#ds wpscan]# ruby -v
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux]
[root#ds wpscan]#
Sounds like you've got multiple ruby installs and that gem is coming from the wrong one.
Try running which ruby and which gem to see if they can point you in the right direction.

Ruby RVM gives me version 2.0 but Bundler says I'm incorrectly running version 2.3

I am just starting to work on an old Ruby Rails project. The Gemfile specifies:
ruby '2.0.0'
I am running a new version of Ubuntu, which I think came with Ruby 2.3 as the default. So I install RVM and then I:
rvm --default use 2.0.0
ruby -v
which gives me:
ruby 2.0.0p648 (2015-12-16 revision 53162) [x86_64-linux]
then I run:
bundle install
and I get this error:
Your Ruby version is 2.3.1, but your Gemfile specified 2.0.0
How do I get RVM to enforce the correct version of Ruby?

Cannot install 'github-pages'

I tried installing github-pages using gem:
sudo gem install 'github-pages'
However, I get the following error:
ERROR: Error installing github-pages:
public_suffix requires Ruby version >= 2.0.
But when I checked my ruby version using ruby --version, it shows:
ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux]
So, my understanding is that gem is somehow referencing an older version of Ruby(previous was 1.9.3). How can I fix this problem? My OS is Ubuntu 14.04 and I upgraded ruby using ruby-install.
I believe you do not need to install github-pages globally, as you are trying.
Just removing sudo in front of your command will do the trick:
gem install 'github-pages'

installing ruby-1.8.4 with rails 2.3.2 giving me error

I have a ruby on rails application, requirement for that app is as below.
ruby version must be ruby-1.8.4
rails 2.3.2
I have installed ruby-1.8.4 without rvm, and installed rubygems version "gem -v"( 1.3.1 ).
But the problem is that when i trying to run command
sudo gem install rails -v=2.3.2
it give me error like this
ERROR: Error installing rails:
rake requires Ruby version >= 1.8.6
Please suggest me how i can install rails 2.3.2 with ruby version 1.8.4
Beware, running such an antique version of ruby/rails has security and other implications. Ruby 1.8.4 is 7 years old, and Rails 2.3.2 is 3 and a half.
But anyway, you need to specifically install an older version of rake before trying to install rails; otherwise gem will just try to install the latest version of rake.
gem install rake -v=0.8.7
gem install rails -v=2.3.2
The problem is not in rails, it's in rake gem. Downgrade rake gem to earlier version - minimum required for rails 2.3.2.

Resources