Feature #12228

JRuby 1.7.2 support

Added by Jean-Philippe Lang about 5 years ago. Updated almost 5 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Ruby support
Target version:2.3.0
Resolution:Fixed

settings500.png (30.7 KB) xt zhang, 2012-11-03 17:45

jruby-openssl.diff Magnifier (321 Bytes) epicmonkey ., 2012-11-28 21:46

pg_jruby1.7.2_mode1.9.png (9.63 KB) Etienne Massip, 2013-01-30 15:23


Related issues

Related to Redmine - Defect #8825: JRuby + Windows: SCMs do not work on Redmine 1.2 Closed 2011-07-15
Related to Redmine - Defect #13044: Rake error using JRuby 1.7.2 and Redmine trunk New

Associated revisions

Revision 10737
Added by Toshi MARUYAMA about 5 years ago

prevent rake task error on JRuby 1.7 (#12228)

Following is "rake db:migrate RAILS_ENV=test" output
on jruby 1.7.0 (1.9.3p203) 2012-10-22 ff1ebbe on OpenJDK Client VM 1.6.0_18-b18 [linux-i386].

ArgumentError: file not found: db:migrate
   non_options at /xxxxx/rubies/jruby-1.7.0/lib/ruby/1.9/test/unit.rb:167
          map! at org/jruby/RubyArray.java:2387
   non_options at /xxxxx/rubies/jruby-1.7.0/lib/ruby/1.9/test/unit.rb:146
   non_options at /xxxxx/rubies/jruby-1.7.0/lib/ruby/1.9/test/unit.rb:207
  process_args at /xxxxx/rubies/jruby-1.7.0/lib/ruby/1.9/test/unit.rb:52
          _run at /xxxxx/rubies/jruby-1.7.0/lib/ruby/1.9/minitest/unit.rb:891
           run at /xxxxx/rubies/jruby-1.7.0/lib/ruby/1.9/minitest/unit.rb:884
           run at /xxxxx/rubies/jruby-1.7.0/lib/ruby/1.9/test/unit.rb:21
       autorun at /xxxxx/rubies/jruby-1.7.0/lib/ruby/1.9/test/unit.rb:326
      run_once at /xxxxx/rubies/jruby-1.7.0/lib/ruby/1.9/test/unit.rb:27
       autorun at /xxxxx/rubies/jruby-1.7.0/lib/ruby/1.9/test/unit.rb:325

Revision 10739
Added by Toshi MARUYAMA about 5 years ago

fix JRuby 1.6 tests fail on CI server (#12228)

Revision 10740
Added by Toshi MARUYAMA about 5 years ago

use String#encode at scm_iconv on Ruby 1.9 (#12228)

Unit git adapter test fails on JRuby 1.7.

Failure:
  <"test-Ü-2.txt">("UTF-8") expected but was
  <"test-\xC3\x9C-2.txt">("ASCII-8BIT").

  diff:
  - test-Ü-2.txt
  ?      ^
  + test-Ü-2.txt
  ?      ^^
test_entries_latin_1_files(GitAdapterTest)
test/unit/lib/redmine/scm/adapters/git_adapter_test.rb:468:in `test_entries_latin_1_files'
     465:         assert entries1
     466:         assert_equal 3, entries1.size
     467:         f1 = entries1[1]
  => 468:         assert_equal "test-#{@char_1}-2.txt", f1.name
     469:         assert_equal "latin-1-dir/test-#{@char_1}-2.txt", f1.path
     470:         assert_equal 'file', f1.kind
     471:       end

Revision 10741
Added by Toshi MARUYAMA about 5 years ago

fix scm_iconv local variable name (#12228)

Revision 10742
Added by Toshi MARUYAMA about 5 years ago

code cleanup scm_iconv (#12228)

Revision 10955
Added by Jean-Philippe Lang almost 5 years ago

Don't use jruby-openssl with JRuby 1.7.0 (#12228).

Revision 11278
Added by Jean-Philippe Lang almost 5 years ago

undefined method `strip' for nil:NilClass error with JRuby 1.7.2 (#12228).

Revision 11279
Added by Jean-Philippe Lang almost 5 years ago

Test failure with JRuby 1.7.2 (#12228).

Revision 11280
Added by Jean-Philippe Lang almost 5 years ago

Test failure with JRuby 1.7.2 (#12228).

History

#1 Updated by Jean-Philippe Lang about 5 years ago

CVS tests fails with JRuby on Windows:
  • @repository.fetch_changesets only loads 5 changesets (instead of 7)
  • rake test dies on test\functional\repositories_cvs_controller_test.rb

#2 Updated by Jean-Philippe Lang about 5 years ago

Toshi, that would be great if you could have a look at the CVS issues with JRuby.

#3 Updated by Toshi MARUYAMA about 5 years ago

CVS tests pass on my Fedora 13.

$ jruby --version
jruby 1.7.0 (1.9.3p203) 2012-10-22 ff1ebbe on OpenJDK 64-Bit Server VM 1.6.0_18-b18 [linux-amd64]

CVS tests fails on Windows JRuby 1.6.
See #8825#note-2.

#4 Updated by xt zhang about 5 years ago

When using JRuby 1.7.0 and setting the account Language to Simplified Chinese, an internal error occurred on the Admin's settings page. When setting the Language to English, the page is ok.

Started GET "/settings" for 127.0.0.1 at 2012-11-04 00:41:00 +0800
Processing by SettingsController#index as HTML
  Current user: admin (id=1)
  Rendered settings/_general.html.erb (69.0ms)
  Rendered settings/_display.html.erb (103.0ms)
  Rendered common/_tabs.html.erb (248.0ms)
  Rendered settings/edit.html.erb within layouts/admin (262.0ms)
Completed 500 Internal Server Error in 315ms

ActionView::Template::Error (incompatible character encodings: UTF-8 and GBK):
    9: <% locale = User.current.language.blank? ? ::I18n.locale : User.current.language %>

    10: <p><%= setting_select :date_format, Setting::DATE_FORMATS.collect {|f| [::I18n.l(D
ate.today, :locale => locale, :format => f), f]}, :blank => :label_language_based %></p>
    11:
    12: <p><%= setting_select :time_format, Setting::TIME_FORMATS.collect {|f| [::I18n.l(T
ime.now, :locale => locale, :format => f), f]}, :blank => :label_language_based %></p>
    13:
    14: <p><%= setting_select :user_format, @options[:user_format] %></p>
    15:
  app/helpers/settings_helper.rb:38:in `setting_select'
  app/views/settings/_display.html.erb:12:in `_app_views_settings__display_html_erb__23830
1203_16264'
  app/views/settings/_display.html.erb:1:in `_app_views_settings__display_html_erb__238301
203_16264'
  app/views/common/_tabs.html.erb:24:in `_app_views_common__tabs_html_erb___1980793840_161
06'
  app/views/common/_tabs.html.erb:23:in `_app_views_common__tabs_html_erb___1980793840_161
06'
  app/helpers/application_helper.rb:259:in `render_tabs'
  app/views/settings/edit.html.erb:3:in `_app_views_settings_edit_html_erb__1640461337_161
02'
  app/controllers/settings_controller.rb:26:in `index'
Environment:
  Redmine version                          2.1.2.stable
  Ruby version                             1.9.3 (java)
  Rails version                            3.2.8
  Environment                              production
  Database adapter                         MySQL
Redmine plugins:
  no plugin installed

#5 Updated by Terence Mill almost 5 years ago

+1

#6 Updated by epicmonkey . almost 5 years ago

Per Codehaus ticket http://jira.codehaus.org/browse/JRUBY-6961 jruby-openssl is bundled with jruby-1.7.x now; furthermore if you try to require and use jruby-openssl on jruby-1.7.0 it will raise an exception "private method `verify_mode=' for OpenSSL::SSL::"

However we can check JRuby version in Gemfile prior warbling and bundling Redmine:

gem "jruby-openssl" if JRUBY_VERSION < '1.7.0'.

Attached diff file to address this.

HTH

#7 Updated by Jean-Philippe Lang almost 5 years ago

JRuby 1.7.0 added to the CI server.

#8 Updated by Jean-Philippe Lang almost 5 years ago

epicmonkey . wrote:

Per Codehaus ticket http://jira.codehaus.org/browse/JRUBY-6961 jruby-openssl is bundled with jruby-1.7.x now; furthermore if you try to require and use jruby-openssl on jruby-1.7.0 it will raise an exception "private method `verify_mode=' for OpenSSL::SSL::"

However we can check JRuby version in Gemfile prior warbling and bundling Redmine:

The provided patch breaks with non-JRuby interpreters as JRUBY_VERSION is not defined. Fixed patch committed in r10955.

#9 Updated by Jean-Philippe Lang almost 5 years ago

FWIW, tests fail on the CI server with JRuby 1.7.0 because of http://jira.codehaus.org/browse/JRUBY-7038 that occurs when running the database migration.

#10 Updated by Terence Mill almost 5 years ago

Jean-Philippe Lang wrote:

FWIW, tests fail on the CI server with JRuby 1.7.0 because of jira.codehaus.org/browse/JRUBY-7038 that occurs when running the database migration.

I succeeded with migration from redmine 1.3 to redmine 2.1, mysql 5+jdbc on opensuse 11.4 rvm =* jruby-1.7.0 [ i386 ]
Must be special case bug.

#11 Updated by Jean-Philippe Lang almost 5 years ago

  • Subject changed from JRuby 1.7.0 support to JRuby 1.7 support

#12 Updated by Jean-Philippe Lang almost 5 years ago

After a few more fixes, r11280 passes the tests suite with JRuby 1.7.2.

#13 Updated by Etienne Massip almost 5 years ago

There have been numerous improvements in the AR-PG JDBC bridge, is RM still unusable with it?

#14 Updated by Etienne Massip almost 5 years ago

Etienne Massip wrote:

There have been numerous improvements in the AR-PG JDBC bridge, is RM still unusable with it?

#15 Updated by Jean-Philippe Lang almost 5 years ago

Tests with PostgreSQL and JRuby1.7.2 have been running on the Redmine CI server for a few days, and it's greeen:

http://www.redmine.org/builds/index.html

#16 Updated by Etienne Massip almost 5 years ago

Jean-Philippe Lang wrote:

Tests with PostgreSQL and JRuby1.7.2 have been running on the Redmine CI server for a few days, and it's greeen:

http://www.redmine.org/builds/index.html

Miss them, good news =)

#17 Updated by Jean-Philippe Lang almost 5 years ago

  • Subject changed from JRuby 1.7 support to JRuby 1.7.2 support
  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Target version changed from Candidate for next major release to 2.3.0
  • Resolution set to Fixed

#18 Updated by Etienne Massip almost 5 years ago

  • Status changed from Closed to Reopened

Because of #13044.

#19 Updated by Etienne Massip almost 5 years ago

Jean-Philippe Lang wrote:

Tests with PostgreSQL and JRuby1.7.2 have been running on the Redmine CI server for a few days, and it's greeen:

http://www.redmine.org/builds/index.html

Wouldn't it work with JRuby 1.6 too?

#20 Updated by Jean-Philippe Lang almost 5 years ago

  • Status changed from Reopened to Closed

Etienne Massip wrote:

Because of #13044.

#13044 is a JRuby/rake/Win32 issue.

Also available in: Atom PDF