Feature #3597

Rails 2.3.4 support

Added by Slava Mikerin over 8 years ago. Updated about 8 years ago.

Status:ClosedStart date:2009-07-08
Priority:NormalDue date:2009-09-13
Assignee:Eric Davis% Done:

100%

Category:-
Target version:0.9.0
Resolution:

Description

Redmine is falling behind times.. Rails 2.3 has been stable for a while and needs to be supported

production.log - Sample production log showing the issue (2.77 KB) John McBade, 2009-08-27 03:03

redmine-upgrade-to-rails-2.3.4.patch Magnifier - Upgrade patch as of 2009-09-06 (189 KB) Eric Davis, 2009-09-06 22:43

redmine-upgrade-to-rails-2.3.4-commit-logs.txt Magnifier - Commit logs and notes from the upgrade (3.21 KB) Eric Davis, 2009-09-06 22:43


Related issues

Related to Redmine - Patch #2265: Revert a specific plugin migrations Closed 2008-12-02

Associated revisions

Revision 2887
Added by Eric Davis about 8 years ago

Upgraded to Rails 2.3.4 (#3597)

  • Ran the Rails upgrade
  • Upgraded to Rails Engines 2.3.2
  • Added a plugin to let Engines override application views.
  • Converted tests to use the new classes:
    • ActionController::TestCase for functional
    • ActiveSupport::TestCase for units
  • Converted ActiveRecord::Error message to a string.
  • ActiveRecord grouping returns an ordered hash which doesn't have #sort!
  • Updated the I18n storage_units format.
  • Added some default initializers from a fresh rails app
  • Changed the order of check_box_tags and hidden_field_tags. The hidden tag
    needs to appear first in Rails 2.3, otherwise it will override any value in
    the check_box_tag.
  • Removed the custom handler for when the cookie store is tampered with.
    Rails 2.3 removed the TamperedWithCookie exception and instead Rails will not
    load the data from it when it's been tampered with (e.g. no user login).
  • Fixed mail layouts, 2.3 has problems with implicit multipart emails that
    use layouts. Also removed some custom Redmine mailer code.
  • Fixed a bug that occurred in tests where the "required" span tag would be
    added to the :field_status translation. This resulted in an email string of:

    <li>Status<span class="required"> *</span><span class="required"> *</span>

    Instead of:

    &lt;li&gt;Status: New&lt;/li&gt;

Revision 9262
Added by Toshi MARUYAMA over 5 years ago

embedded plugin: replace Test::Unit::TestCase to ActiveSupport::TestCase for Rails 2.3 (#3597)

History

#1 Updated by Jean-Philippe Lang over 8 years ago

Redmine 0.9 will use Rails 2.3.
Can you explain why you need Rails 2.3 support ?

#2 Updated by Slava Mikerin over 8 years ago

Rails 2.3 is the latest stable version and needs to be supported regardless of MY needs. There are plenty of reasons why 2.3 is preferable. However I already found the rails 2.3 supported version [http://github.com/asoltys/redmine/commits/rails_2-3-2_compatibility]

#3 Updated by Eric Davis over 8 years ago

Slava Mikerin wrote:

Rails 2.3 is the latest stable version and needs to be supported regardless of MY needs.

I disagree with your reason but not the request. While I would like to have some new features in Rails 2.3, upgrading just because there is a new version will cause a lot of extra work for already time constrained developers. One issue that really needs to be checked is Redmine plugin compatibility. Rails 2.3 and Rails Engines changed a lot in this release and I'm expecting some major breakage that all plugin authors will have to fix (e.g. routes.rb).

I'd suggest waiting for Rails 2.3.3 to come out. It has been promised any day now and is supposed to include some bug fixes for 2.3.2.

#5 Updated by Eric Davis over 8 years ago

  • Subject changed from Rails 2.3 support to Rails 2.3.3 support
  • Status changed from New to 7
  • Assignee set to Eric Davis
  • Target version set to 0.9.0

Rails 2.3.3 is out, so we should see about upgrading now. I'll take it since I'll be able to test my plugins and fix any incompatibilities.

#6 Updated by John McBade about 8 years ago

I have been trying to install Redmine on a Hostgator server and they are running Rails 2.3.3. The lastest Redmine I have is: redmine-0.8.4

I get an error page generated by Redmine (404 error)

Quote:
The page you were looking for doesn't exist.

You may have mistyped the address or the page may have moved.
Unquote:

I attached a production log that shows it's a routes.rb issue? (Sorry, new to Ruby)

While we are waiting for .9, is there any work around for this? Hostgator is not going to let me downgrade Rails :)

Thanks,

-John

#7 Updated by Eric Davis about 8 years ago

  • Subject changed from Rails 2.3.3 support to Rails 2.3.4 support

John McBade:

Redmine 0.8.4 will not work with Rails 2.3, you need to use Rails 2.1.2. If you run rake rails:freeze:edge RELEASE=2.1.2, Rails will download and extract the 2.1.2 version of Rails to vendor/rails. Upload that to Hostgator and Redmine will work. Redmine loads Rails from that directory first, before loading the one installed on the server.

In other news, I'm working on getting Rails 2.3.4 working on trunk.

#8 Updated by Eric Davis about 8 years ago

I've completed the upgrade to Rails 2.3.4 and would like to get some feedback and testing before I push it into the trunk. There wasn't a lot of external changes but there were some tricky internal changes:

  • Rails 2.3 removed the TamperedWithCookie exception
  • check_box_tag and hidden_field_tag behave differently now so their placement had to be swapped in the html
  • The format of storage_units I18n strings were changed. I believe I've fixed the translations but I'd like to get a quick review from the translation team on them.
  • TabularFormBuilder was overwriting I18n strings in the testing runtime with HTML values
  • Part of Rails Engines is now in the Rails core, so I had to create a new plugin to allow Redmine plugins to override views.
  • Redmine plugins that use a routes.rb will need to update it to the Rails 2.3 format.

The upgrade is on my rails-2.3 branch on GitHub. A patch and commit log is attached for review. I'd like to push this into trunk next weekend (September 12-13th) unless a critical bug is found.

Thanks

#9 Updated by Eric Davis about 8 years ago

  • Status changed from 7 to Closed

Merged in my Rails 2.3.4 branch into trunk at r2887.

#10 Updated by Eric Davis about 8 years ago

  • Tracker changed from Defect to Feature

#11 Updated by Etienne Massip about 8 years ago

Using svn trunk, I still got the issue described here http://www.redmine.org/boards/2/topics/8411 running either mongrel or rake until I set the RAILS_GEM_VERSION property to '2.3.2' in environment.rb.

#12 Updated by Etienne Massip about 8 years ago

  • Status changed from Closed to Reopened

#13 Updated by Eric Davis about 8 years ago

  • Status changed from Reopened to Closed

Etienne Massip wrote:

Using svn trunk, I still got the issue described here http://www.redmine.org/boards/2/topics/8411 running either mongrel or rake until I set the RAILS_GEM_VERSION property to '2.3.2' in environment.rb.

Please don't reopen features if there is a bug. If that happened, every bug would end up being listed in the comments and will lose track of which bugs are fixed or still open. Go ahead and open a new Bug and include a link to the forum post and this issue.

Thanks

Also available in: Atom PDF