Project

General

Profile

Actions

Feature #25048

closed

Ruby 2.4 support

Added by VVD VVD almost 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
Category:
Ruby support
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

Ruby 2.4.0 was released 25 Dec 2016.


Files


Related issues

Related to Redmine - Defect #25460: Redmine 3.3.2 db:migrate terminate with cryptic error messageClosed

Actions
Copied from Redmine - Feature #21668: Ruby 2.3 supportClosed

Actions
Actions #1

Updated by VVD VVD almost 8 years ago

Actions #2

Updated by Go MAEDA almost 8 years ago

  • Target version set to Candidate for next major release

Ruby on Rails 4.2.8 that is compatible with Ruby 2.4 will be released next week.

http://weblog.rubyonrails.org/2017/2/10/Rails-4-2-8-rc1-has-been-released/

If no regressions are found, expect the final release on Wednesday, February 15, 2017.

Actions #4

Updated by Toshi MARUYAMA almost 8 years ago

Rails 4.2.8 on Ruby 2.4 tests fail.

  1) Failure:
QueryTest#test_issue_count_by_list_custom_field_group [/REDMINE/WORK-DIR-NO-RAID/hg-workdir/bb-my-work-clean/test/unit/query_test.rb:1591]:
Expected: ["Fixnum"]
  Actual: ["Integer"]

  2) Failure:
QueryTest#test_issue_count_by_association_group [/REDMINE/WORK-DIR-NO-RAID/hg-workdir/bb-my-work-clean/test/unit/query_test.rb:1582]:
Expected: ["Fixnum"]
  Actual: ["Integer"]

  3) Failure:
QueryTest#test_issue_count_by_date_custom_field_group [/REDMINE/WORK-DIR-NO-RAID/hg-workdir/bb-my-work-clean/test/unit/query_test.rb:1600]:
Expected: ["Fixnum"]
  Actual: ["Integer"]

  4) Error:
Redmine::CipheringTest#test_ciphered_password_with_no_cipher_key_configured_should_be_returned_ciphered:
ArgumentError: key must be 32 bytes
    lib/redmine/ciphering.rb:32:in `key='
    lib/redmine/ciphering.rb:32:in `encrypt_text'
    lib/redmine/ciphering.rb:100:in `write_ciphered_attribute'
    app/models/repository.rb:92:in `password='
    test/unit/lib/redmine/ciphering_test.rb:67:in `block in test_ciphered_password_with_no_cipher_key_configured_should_be_returned_ciphered'
    lib/redmine/configuration.rb:77:in `with'
    test/unit/lib/redmine/ciphering_test.rb:66:in `test_ciphered_password_with_no_cipher_key_configured_should_be_returned_ciphered'

  5) Error:
Redmine::CipheringTest#test_encrypt_all:
ArgumentError: key must be 32 bytes
    lib/redmine/ciphering.rb:32:in `key='
    lib/redmine/ciphering.rb:32:in `encrypt_text'
    lib/redmine/ciphering.rb:100:in `write_ciphered_attribute'
    app/models/repository.rb:92:in `password='
    lib/redmine/ciphering.rb:74:in `block (2 levels) in encrypt_all'
    lib/redmine/ciphering.rb:72:in `block in encrypt_all'
    lib/redmine/ciphering.rb:71:in `encrypt_all'
    test/unit/lib/redmine/ciphering_test.rb:87:in `block in test_encrypt_all'
    lib/redmine/configuration.rb:77:in `with'
    test/unit/lib/redmine/ciphering_test.rb:86:in `test_encrypt_all'

  6) Error:
Redmine::CipheringTest#test_password_should_be_encrypted:
ArgumentError: key must be 32 bytes
    lib/redmine/ciphering.rb:32:in `key='
    lib/redmine/ciphering.rb:32:in `encrypt_text'
    lib/redmine/ciphering.rb:100:in `write_ciphered_attribute'
    app/models/repository.rb:92:in `password='
    test/unit/lib/redmine/ciphering_test.rb:24:in `block in test_password_should_be_encrypted'
    lib/redmine/configuration.rb:77:in `with'
    test/unit/lib/redmine/ciphering_test.rb:23:in `test_password_should_be_encrypted'

  7) Error:
Redmine::CipheringTest#test_decrypt_all:
ArgumentError: key must be 32 bytes
    lib/redmine/ciphering.rb:32:in `key='
    lib/redmine/ciphering.rb:32:in `encrypt_text'
    lib/redmine/ciphering.rb:100:in `write_ciphered_attribute'
    app/models/repository.rb:92:in `password='
    test/unit/lib/redmine/ciphering_test.rb:97:in `block in test_decrypt_all'
    lib/redmine/configuration.rb:77:in `with'
    test/unit/lib/redmine/ciphering_test.rb:96:in `test_decrypt_all'

4364 runs, 25207 assertions, 3 failures, 4 errors, 3 skips

Actions #5

Updated by Go MAEDA almost 8 years ago

We have to use Nokogiri >= 1.7.0 to fix "FixNum is deprecated" warning. (https://github.com/sparklemotion/nokogiri/issues/1565)

diff --git a/Gemfile b/Gemfile
index bb8ba53..f9a5dbc 100644
--- a/Gemfile
+++ b/Gemfile
@@ -15,7 +15,7 @@ gem "actionpack-xml_parser" 
 gem "roadie-rails" 
 gem "mimemagic" 

-gem "nokogiri", "~> 1.6.8" 
+gem "nokogiri", (RUBY_VERSION >= "2.1" ? ">= 1.7.0" : "~> 1.6.8")
 gem "i18n", "~> 0.7.0" 

 # Request at least rails-html-sanitizer 1.0.3 because of security advisories
</diff>
Actions #6

Updated by Go MAEDA almost 8 years ago

  • File ruby-2_4-support.diff added

This is a patch to support ruby 2.4: attachment:ruby-2_4-support.diff

  • Fixed "Fixnum is deprecated" warning from nokogiri
  • s/FixNum/Integer/ in test/unit/query_test.rb
  • Fixed "key must be 32 bytes" error from OpenSSL::Cipher
Actions #7

Updated by Go MAEDA almost 8 years ago

Go MAEDA wrote:

This is a patch to support ruby 2.4: attachment:ruby-2_4-support.diff

Sorry, I withdraw this patch. I have found compatibility problem in Redmine::Ciphering.encrypt_text / Redmine::Ciphering.decrypt_text.

Actions #8

Updated by Go MAEDA almost 8 years ago

  • File deleted (ruby-2_4-support.diff)
Actions #10

Updated by Jean-Philippe Lang almost 8 years ago

  • Target version changed from Candidate for next major release to 3.4.0
Actions #11

Updated by Jean-Philippe Lang almost 8 years ago

Fix committed and ruby2.4 added to the CI server, thanks.

Actions #12

Updated by Jean-Philippe Lang almost 8 years ago

  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

Tests pass on the CI server.

Actions #13

Updated by Go MAEDA over 7 years ago

  • Related to Defect #25460: Redmine 3.3.2 db:migrate terminate with cryptic error message added
Actions #14

Updated by Go MAEDA about 4 years ago

  • Related to Patch #34153: Use sum instead of inject(0, :+) added
Actions #15

Updated by Go MAEDA about 4 years ago

  • Related to deleted (Patch #34153: Use sum instead of inject(0, :+))
Actions

Also available in: Atom PDF