Feature #4796
Rails 3 support
| Status: | New | Start date: | 2010-02-10 | ||
|---|---|---|---|---|---|
| Priority: | Low | Due date: | |||
| Assignee: | - | % Done: | 70% |
||
| Category: | Rails support | ||||
| Target version: | Candidate for next major release | ||||
| Resolution: |
Description
Migrate Redmine to Rails 3 once Rails is out of beta. Must make sure Redmine plugins are still functional and can be ported easily from Rails 2.x.
Related issues
Associated revisions
replace « and » at app/helpers/application_helper.rb to hexadecimal UTF-8 strings (#4796).
replace « and » at app/views/search/index.rhtml to hexadecimal UTF-8 strings (#4796).
replace « and » at app/views/wiki/show.rhtml to hexadecimal UTF-8 strings (#4796).
replace « and » at app/views/gantts/show.html.erb to hexadecimal UTF-8 strings (#4796).
replace « and » at app/views/activities/index.html.erb to hexadecimal UTF-8 strings (#4796).
Rails3: model: query: parse dates using UTC (ruby 1.9 inside) (#4796)
On Rails 3.0 and Ruby 1.8.7 in Japan (UTC+9), tests fails with following messages.
test_operator_date_equals(QueryTest) [test/unit/query_test.rb:206]:
<"(issues.due_date > '2011-07-09 14:59:59.999999' AND issues.due_date <= '2011-07-10 14:59:59.999999')
AND (issue_statuses.is_closed='f')"> expected to be =~
</issues\.due_date > '2011-07-09 23:59:59(\.9+)?' AND issues\.due_date <= '2011-07-10 23:59:59(\.9+)?/>.
Contributed by Sylvain Utard.
Rails3.2: pdf: comment out ::ActionView::TemplateHandlers::ERB of rfpdf plugin (#4796)
ActionView::TemplateHandlers is deprecated on Rails3.2
and Redmine cannot boot on Rails3.2.
Redmine does not use this rfpdf plugin feature.
Ruby1.9: skip enforcing UTF-8 encodings on the params hash on Rails2 if it is frozen (#4050, #4796)
Tests on CI server fail.
http://www.redmine.org/builds/build_trunk-1.9.2-sqlite3_257.html
1) Error:
test_index_with_short_filters(IssuesControllerTest):
RuntimeError: can't modify frozen string
/var/lib/hudson/jobs/trunk-1.9.2-sqlite3/workspace/app/controllers/application_controller.rb:58:in `force_encoding'
/var/lib/hudson/jobs/trunk-1.9.2-sqlite3/workspace/app/controllers/application_controller.rb:58:in `utf8nize!'
/var/lib/hudson/jobs/trunk-1.9.2-sqlite3/workspace/app/controllers/application_controller.rb:60:in `block in utf8nize!'
/var/lib/hudson/jobs/trunk-1.9.2-sqlite3/workspace/app/controllers/application_controller.rb:60:in `each'
/var/lib/hudson/jobs/trunk-1.9.2-sqlite3/workspace/app/controllers/application_controller.rb:60:in `utf8nize!'
/var/lib/hudson/jobs/trunk-1.9.2-sqlite3/workspace/app/controllers/application_controller.rb:52:in `params_filter'
/var/lib/hudson/ruby1.9.2/lib/ruby/gems/1.9.1/gems/activesupport-2.3.14/lib/active_support/callbacks.rb:178:in `evaluate_method'
/var/lib/hudson/ruby1.9.2/lib/ruby/gems/1.9.1/gems/activesupport-2.3.14/lib/active_support/callbacks.rb:166:in `call'
/var/lib/hudson/ruby1.9.2/lib/ruby/gems/1.9.1/gems/actionpack-2.3.14/lib/action_controller/filters.rb:225:in `call'
/var/lib/hudson/ruby1.9.2/lib/ruby/gems/1.9.1/gems/actionpack-2.3.14/lib/action_controller/filters.rb:629:in `run_before_filters'
/var/lib/hudson/ruby1.9.2/lib/ruby/gems/1.9.1/gems/actionpack-2.3.14/lib/action_controller/filters.rb:615:in `call_filters'
/var/lib/hudson/ruby1.9.2/lib/ruby/gems/1.9.1/gems/actionpack-2.3.14/lib/action_controller/filters.rb:610:in `perform_action_with_filters'
/var/lib/hudson/ruby1.9.2/lib/ruby/gems/1.9.1/gems/actionpack-2.3.14/lib/action_controller/benchmarking.rb:68:in `block in perform_action_with_benchmark'
/var/lib/hudson/ruby1.9.2/lib/ruby/gems/1.9.1/gems/activesupport-2.3.14/lib/active_support/core_ext/benchmark.rb:17:in `block in ms'
Rails3: add number.format to ro and sk locales (#4796)
Test fails on Rails 3.0.11 and Ruby 1.8.7.
Failure:
test_number_to_human_size_for_each_language(Redmine::I18nTest)
[test/unit/lib/redmine/i18n_test.rb:114:in `test_number_to_human_size_for_each_language'
test/unit/lib/redmine/i18n_test.rb:112:in `each'
test/unit/lib/redmine/i18n_test.rb:112:in `test_number_to_human_size_for_each_language']:
sk failure.
Exception raised:
TypeError(<can't convert nil into String>)
History
Updated by Etienne Massip over 1 year ago
Rails 3 final is out (http://weblog.rubyonrails.org/2010/8/29/rails-3-0-it-s-done) !
Someone already did the job : http://github.com/jeremy/redmine !
Updated by Eric Davis over 1 year ago
- Assignee deleted (
Eric Davis)
Updated by Luiz Picanço about 1 year ago
Any news about this ?
Updated by John Yani about 1 year ago
1.2.0 will stick with 2.3.10 (#6887)
Maybe after 1.2.0 release something will be clearer. What is engines support BTW?
Updated by Eric Thomas about 1 year ago
John Yani wrote:
1.2.0 will stick with 2.3.10 (#6887)
Maybe after 1.2.0 release something will be clearer. What is engines support BTW?
The next release of rails (3.1) will have engines support.
Updated by Felix Schäfer about 1 year ago
Eric Thomas wrote:
The next release of rails (3.1) will have engines support.
Source/link? I fear they won't work exactly like the ones in 2.3 did, i.e. we still have to evaluate exactly what changes and how that affects us.
Updated by Jean-Baptiste Barth about 1 year ago
Sources: rails-engines site, the blog of Piotr Sarnacki, and I've got some bookmarks about the transition at home.
What's sure for now:- Rails 3.0 supports a kind of Engines, but there's no mechanism for migrations, nor copying assets automatically (nor overriding views iirc) ; for sure they're not useable in Redmine at this point
- Rails 3.1 Engines will support these kind of things (needs to be precised I know), but all documentation I read on Rails3' engines makes me think that plugin developers would have to package their plugin as a gem
- Redmine cannot support Rails 2.3.x and Rails 3.x at the same time :)
Updated by Etienne Massip 12 months ago
Just a note about .xml format : Rails 3 does not include Builder anymore, it's now one of its dependencies.
Updated by Toshi MARUYAMA 11 months ago
- Category set to Rails support
Updated by Etienne Massip 9 months ago
Jean-Baptiste Barth wrote:
- Rails 3.0 supports a kind of Engines, but there's no mechanism for migrations, nor copying assets automatically (nor overriding views iirc) ; for sure they're not useable in Redmine at this point
- Rails 3.1 Engines will support these kind of things (needs to be precised I know), but all documentation I read on Rails3' engines makes me think that plugin developers would have to package their plugin as a gem
Indeed, Rails 3.1 RC is out and supports migrations as well as moutable apps, see http://weblog.rubyonrails.org/2011/5/22/rails-3-1-release-candidate.
Notes- :
Rails 3 applications include a Gemfile and support the use of Bundler (see http://weblog.rubyonrails.org/2010/8/29/rails-3-0-it-s-done).
Rails 3.1 default scripting lib is now jQuery instead of Prototype.
Updated by Fabian Becker 8 months ago
Is there any update on migrating to Rails 3.x? It's becoming a pain maintaining Redmine as it currently is. Upgrading to 3.0/3.1RC would definitely improve the development process.
I do understand that you are having trouble loosing compatibility to lots of good Redmine plugins, so I suggest you start Redmine + Rails 3.1RC development on a seperate branch and publish Redmine for both Rails versions in a transitional period (maybe 1 year?) giving all plugin developers time to migrate their plugins to a Rails Engine.
Any thoughts?
Updated by Etienne Massip 8 months ago
- Target version set to Candidate for next major release
Fabian Becker wrote:
It's becoming a pain maintaining Redmine as it currently is.
Can't see why ?
Updated by Toshi MARUYAMA 8 months ago
Updated by Toshi MARUYAMA 8 months ago
I updated revisions.
Merged¶
Straight revisions¶
Updated by Etienne Massip 8 months ago
You should try to make it work straight with Rails 3.1 (rc4 is the last release) since (I guess) Redmine will never run with 3.0 due to the lack of engine support.
Moreover, you might detect and report some Rails 3.1 rc issues whic could be fixed before release time, making it easier to integrate with RM.
BTW, do you run Rails 3 RM with Ruby 1.9 ?
Updated by Toshi MARUYAMA 8 months ago
I start to target Rails 3.1.
Merged¶
Straight revisions¶
- https://bitbucket.org/marutosi/redmine-rails3.1-bb
- https://github.com/marutosi/redmine/tree/rails3.1-20110625
- https://bitbucket.org/marutosi/redmine-rails3.1-bb/changeset/e8800779ffb0
- https://github.com/marutosi/redmine/commit/e864d6dc582ac42aa1ef5d25b7c7810653466ff8
With dummy config/routes.rb, this revisions can boot with "ruby script/rails server",
and run "rake test:units".
Updated by Etienne Massip 7 months ago
RoR team is organizing a hack fest for 3.1 : http://weblog.rubyonrails.org/2011/7/14/rails-3-1-hackfest
Updated by Toshi MARUYAMA 6 months ago
I rebased on r6523.
Git: Mercurial:Updated by Toshi MARUYAMA 6 months ago
I success to show main menu on Rails 3.1.
Git:
Mercurial:
Updated by Toshi MARUYAMA 6 months ago
http://mrjaba.posterous.com/ruby-news-roundup-06-04-2011
:rhtml and :rxml were finally removed as template handlers.
Updated by Etienne Massip 6 months ago
Nice job on routes =)
Got some nice reading for you: http://www.h-online.com/open/features/From-Rails-2-3-to-3-0-1285884.html
Edit: permalink: http://h-online.com/-1285884
Updated by Luiz Picanço 6 months ago
Interesting article !
Etienne Massip wrote:
Nice job on routes =)
Got some nice reading for you: http://www.h-online.com/open/features/From-Rails-2-3-to-3-0-1285884.html
Edit: permalink: http://h-online.com/-1285884
Updated by David Bennett 6 months ago
If you need any direction, the Spree project has great 3.0 and 3.1 support: http://spreecommerce.com/blog
The "Extension" system they have is great as you just add a line in your Gemfile that points to a github project and vola! extra features :)
BDQ has also created Deface, A view editor that alters views based on css rules: https://github.com/railsdog/deface
Updated by Etienne Massip 5 months ago
3.1 released 3 hours ago: http://twitter.com/#!/rails/status/108740744306634752
Release notes: http://guides.rubyonrails.org/3_1_release_notes.html
Updated by Etienne Massip 5 months ago
Another article from the H: http://h-online.com/-1285887
Updated by Alexandre de Oliveira 5 months ago
So, is there any official announcement regarding 3.x support? A plan? Redmine 2.0? I found nothing on Wiki. Is there anyone leading the efforts to this end?
Because I'd like to contribute to make Redmine Rails 3.x compatible. It's not clear if there's a branch for it. I guess any patch regarding this shouldn't go to master branch, isn't it? It seems Toshi is already doing some work on this. How could I be of help regarding this matter?
Second, don't you agree this is not the correct place for posting about these Rails 3.1's new features articles, like Etienne's?
Thank you.
Updated by Toshi MARUYAMA 4 months ago
- % Done changed from 0 to 40
I rebased on r7627.
Git: Mercurial:If you run with current database of Redmine 1.2 on Rails 2.3.11,
you need to run "rake db:migrate".
In order to run tests,
you need to install object_daddy for Rails 3.1.
ruby script/rails plugin install git://github.com/awebneck/object_daddy.gitThe revisions are from following repositories.
- https://github.com/redox/redmine
- https://github.com/mhanne/chiliproject/tree/rails-3.1
- https://github.com/thegcat/chiliproject/tree/rails-3.1
Git and Mercurial revisions are synchronized by hg-git .
If you want to improve it, you can choose what you like.
Updated by David Bennett 3 months ago
As this is now Rails 3.1... and a lot of things will break in the upgrade anyway.
Would it be a good idea to change this to a mountable engine?
(or even a stranded engine so that users can upgrade by just changing the version in the Gemfile.)
I have experience and can help out if you go down this path.
CON: You may want to namespace everything so it plays nice with other mountable engines.
Updated by Felix Schäfer 3 months ago
David, do you have experience with the 3.1 full engines?
Updated by David Bennett 3 months ago
Felix Schäfer wrote:
David, do you have experience with the 3.1 full engines?
If by full engines you mean ones with there own logic/models/controllers/migrations that can be added by just adding something to your Gemfile.
Then yes, I use them where ever possible :)
Though I don't have all that much experience with mountable ones yet.. as 3.1 is still new and I don't really have any bread-n-butter projects in my day job that could use the functionality.
Updated by Felix Schäfer 3 months ago
David Bennett wrote:
Felix Schäfer wrote:
David, do you have experience with the 3.1 full engines?
If by full engines you mean ones with there own logic/models/controllers/migrations that can be added by just adding something to your Gemfile.
Then yes, I use them where ever possible :)
Though I don't have all that much experience with mountable ones yet.. as 3.1 is still new and I don't really have any bread-n-butter projects in my day job that could use the functionality.
No, that's full engines vs. mountable apps. Mountable apps are self-contained and referenced only in the parent routes.rb to tell which "top-level" URI the mountable app has. Full engines are "nearer" to the 2.3 engines in that they are loaded with the main app, have access to all the same models, controllers, and everything (mountable apps are fully segregated). Both types are/can be packaged as gems though.
Updated by Toshi MARUYAMA 2 months ago
I rebased on r7962.
Git:
Mercurial: Revisions are from a following repository.Updated by Toshi MARUYAMA 2 months ago
I rebased on r7967.
Git:
- https://bitbucket.org/marutosi/redmine-rails3.1-straight-20111129-git
- https://github.com/marutosi/redmine/tree/rails3.1-straight-20111129
Mercurial:
I adapted r7900 labelled_tabular_form_for.
Updated by Toshi MARUYAMA 2 months ago
- % Done changed from 40 to 50
I rebased on r8089.
Git:- https://bitbucket.org/marutosi/redmine-rails3.1-straight-20111205-git
- https://github.com/marutosi/redmine/tree/rails3.1-straight-20111205
Changes¶
- rename css to css.erb
- use asset_path instead of hard-coded path
Revisions are from following repository.1diff --git a/app/assets/stylesheets/scm.css.erb b/app/assets/stylesheets/scm.css.erb 2--- a/app/assets/stylesheets/scm.css.erb 3+++ b/app/assets/stylesheets/scm.css.erb 4@@ -9,7 +9,7 @@ 5 6 li.change { 7 list-style-type:none; 8- background-image: url(../images/bullet_black.png); 9+ background-image: url(<%= asset_path "bullet_black.png" %>); 10 background-position: 1px 1px; 11 background-repeat: no-repeat; 12 padding-top: 1px;
Updated by Toshi MARUYAMA about 1 month ago
I rebased on r8304.
Git:
https://bitbucket.org/marutosi/redmine-rails3.1-straight-20111220-git
- Rails 3.1.3
- Rails 3.2.0.rc1
https://github.com/marutosi/redmine/tree/rails3.1-straight-20111220
- Rails 3.1.3
- Rails 3.2.0.rc1
Mercurial:
https://bitbucket.org/marutosi/redmine-rails3.1-straight-20111220-hg-git
Updated by Toshi MARUYAMA about 1 month ago
- % Done changed from 50 to 60
I rebased on r8480.
Almost all routing tests pass.
Git:
https://bitbucket.org/marutosi/redmine-rails3.1-straight-20120103-git
- Rails 3.1.3
- Rails 3.2.0.rc1
https://github.com/marutosi/redmine/tree/rails3.1-straight-20120103
- Rails 3.1.3
- Rails 3.2.0.rc1
Mercurial:
https://bitbucket.org/marutosi/redmine-rails3.1-straight-20120103-hg-git
Updated by Toshi MARUYAMA 28 days ago
- % Done changed from 60 to 70
I rebased on r8633.
route.rb is all new Rails3 format.
Git:
https://bitbucket.org/marutosi/redmine-rails3.1-straight-20120111-git
- Rails 3.1.3
- Rails 3.2.0.rc2
https://github.com/marutosi/redmine/tree/rails3.1-straight-20120111
- Rails 3.1.3
- Rails 3.2.0.rc2
Mercurial:
https://bitbucket.org/marutosi/redmine-rails3.1-straight-20120111-hg-git