Defect #27206

cannot install public_suffix if ruby < 2.1

Added by Gena Makhomed about 1 month ago. Updated about 1 month ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:3.3.6
Resolution:Fixed Affected version:

Description

it don't work:

# bundle install --without development test
[...]

Gem::InstallError: public_suffix requires Ruby version >= 2.1.
An error occurred while installing public_suffix (3.0.0), and Bundler cannot continue.
Make sure that `gem install public_suffix -v '3.0.0'` succeeds before bundling.

# gem install public_suffix -v '3.0.0'
ERROR:  Error installing public_suffix:
        public_suffix requires Ruby version >= 2.1.

So, I can't upgrade Redmine to new version on latest CentOS 7.4 server.

Can you please fix this bug?

# cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)

# ruby -v
ruby 2.0.0p648 (2015-12-16) [x86_64-linux]

# yum update ruby
No packages marked for update

Related issues

Related to Redmine - Defect #27229: public_suffix requires Ruby version >= 2.0 Closed

Associated revisions

Revision 17011
Added by Toshi MARUYAMA about 1 month ago

3.4-stable: Gemfile: pin public_suffix if ruby < 2.1

Revision 17012
Added by Toshi MARUYAMA about 1 month ago

3.3-stable: Gemfile: pin public_suffix if ruby < 2.1

Revision 17013
Added by Toshi MARUYAMA about 1 month ago

3.2-stable: Gemfile: pin public_suffix if ruby < 2.1

History

#1 Updated by Toshi MARUYAMA about 1 month ago

  • Category deleted (Ruby support)
  • Status changed from New to Closed
  • Priority changed from Urgent to Low
  • Resolution set to Invalid

You use trunk branch not 3.4-stable.

#2 Updated by Toshi MARUYAMA about 1 month ago

  • Status changed from Closed to New
  • Priority changed from Low to Normal
  • Resolution deleted (Invalid)

#3 Updated by Toshi MARUYAMA about 1 month ago

  • Status changed from New to Closed
  • Resolution set to Invalid
$ ruby --version
ruby 2.0.0p648 (2015-12-16 revision 53162) [x86_64-linux]

$ bundle list | grep public
  * public_suffix (2.0.5)

#4 Updated by Gena Makhomed about 1 month ago

  • Status changed from Closed to Reopened

Toshi MARUYAMA wrote:

You use trunk branch not 3.4-stable.

I use Redmine 3.4.2.stable version
and try upgrade to stable version http://www.redmine.org/releases/redmine-3.4.3.tar.gz
as it described on page http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade

But upgrade to 3.4.3 fails with error:

# bundle install --without development test
[...]

Gem::InstallError: public_suffix requires Ruby version >= 2.1.
An error occurred while installing public_suffix (3.0.0), and Bundler cannot continue.
Make sure that `gem install public_suffix -v '3.0.0'` succeeds before bundling.

P.S.


https://redmine.ideil.com/admin/info

Environment:
  Redmine version                3.4.2.stable
  Ruby version                   2.0.0-p648 (2015-12-16) [x86_64-linux]
  Rails version                  4.2.8
  Environment                    production
  Database adapter               Mysql2
SCM:
  Subversion                     1.7.14
  Git                            1.8.3.1
  Filesystem                     
Redmine plugins:
  redmine_agile                  1.4.5
  redmine_checklists             3.1.10
  redmine_contacts               4.1.1
  redmine_contacts_invoices      4.1.6
  redmine_people                 1.3.2

#5 Updated by Go MAEDA about 1 month ago

Toshi MARUYAMA wrote:

[...]

On my environment (Ruby 2.3), `public_suffix` 3.0.0 was installed after running `bundle update`. I will try on CentOS 7 later.

#6 Updated by Toshi MARUYAMA about 1 month ago

  • Subject changed from Can't upgrade Redmine to 3.4.3 version on CentOS 7.4 to cannot install public_suffix 3 if ruby < 2.1
  • Target version set to 3.3.6
  • Resolution deleted (Invalid)

#7 Updated by Toshi MARUYAMA about 1 month ago

  • Status changed from Reopened to Closed
  • Target version deleted (3.3.6)
  • Resolution set to Fixed
  • Affected version deleted (3.4.3)

I recommend you not use distribution package ruby.

#8 Updated by Nicolas BOURGES about 1 month ago

Hi,

Edit GemFile and add this :

gem "public_suffix", "2.0.5"

The version 3.0.0 of public_suffix gem need Ruby >= 2.1 : https://rubygems.org/gems/public_suffix/

Regards,

Nico

#9 Updated by Gena Makhomed about 1 month ago

Nicolas BOURGES wrote:

Edit GemFile and add this :

gem "public_suffix", "2.0.5"

Nicolas, Thank you very much!

Now I upgrade to Redmine 3.4.3, it works fine.

#10 Updated by Go MAEDA about 1 month ago

  • Target version set to 3.3.6

The problem is going to be fixed in next minor release, Redmine 3.4.4 and 3.3.6.
For the temporarily around, please add the following line to Gemfile (ref) (thanks to Nicolas BOURGES).

gem "public_suffix", "~> 2.0.5" if RUBY_VERSION < "2.1" 

This fix should appear in the CHANGELOG. Setting target version to 3.3.6.

#11 Updated by Go MAEDA about 1 month ago

  • Related to Defect #27229: public_suffix requires Ruby version >= 2.0 added

#12 Updated by Toshi MARUYAMA about 1 month ago

  • Subject changed from cannot install public_suffix 3 if ruby < 2.1 to cannot install public_suffix if ruby < 2.1

Also available in: Atom PDF