0

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.
droid
  • 83
  • 1
  • 1
  • 8

1 Answers1

-1

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.

mcfinnigan
  • 11,442
  • 35
  • 28
  • 1
    `>= 2.3` does not restrict installation with 3.x, and I just tested to be sure. OP's issue is probably linked to `sudo` not looking up the same environment – Jaffa May 18 '21 at 07:36
  • @Geoffroy ah, interesting. Just saw this elsewhere too - https://stackoverflow.com/questions/58775795/fastlane-nokogiri-requires-ruby-version-2-3-0-error?rq=1 - which seems to back your hypothesis. – mcfinnigan May 18 '21 at 07:39
  • just try to install the gem and it won't be an hypothesis anymore :) You made me doubt so I had to try :) – Jaffa May 18 '21 at 07:44
  • 1
    @Geoffroy I don't have ruby 3.x installled locally and don't feel like waiting 20+ minutes for this useless work laptop to download and build it :D – mcfinnigan May 18 '21 at 07:45