Feature #4796
closedRails 3 support
Added by Eric Davis almost 15 years ago. Updated over 12 years ago.
100%
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.
Files
response_time.png (5.76 KB) response_time.png | Jean-Philippe Lang, 2012-03-02 20:46 |
Related issues
Updated by Etienne Massip about 14 years 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 John Yani almost 14 years 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 almost 14 years 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 almost 14 years 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 almost 14 years 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 almost 14 years ago
Just a note about .xml format : Rails 3 does not include Builder anymore, it's now one of its dependencies.
Updated by Etienne Massip over 13 years 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 over 13 years 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 over 13 years 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 over 13 years ago
Updated by Toshi MARUYAMA over 13 years ago
I updated revisions.
Merged¶
Straight revisions¶
Updated by Etienne Massip over 13 years 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 over 13 years 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 over 13 years 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 over 13 years ago
I rebased on r6523.
Git: Mercurial:Updated by Toshi MARUYAMA over 13 years ago
I success to show main menu on Rails 3.1.
Git:
Mercurial:
Updated by Toshi MARUYAMA over 13 years ago
http://mrjaba.posterous.com/ruby-news-roundup-06-04-2011
:rhtml and :rxml were finally removed as template handlers.
Updated by Etienne Massip over 13 years 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 over 13 years 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 about 13 years 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 about 13 years 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 about 13 years ago
Another article from the H: http://h-online.com/-1285887
Updated by Alexandre de Oliveira about 13 years 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 about 13 years 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 about 13 years 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 about 13 years ago
David, do you have experience with the 3.1 full engines?
Updated by David Bennett about 13 years 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 about 13 years 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 almost 13 years ago
I rebased on r7962.
Git:
Mercurial: Revisions are from a following repository.Updated by Toshi MARUYAMA almost 13 years 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 almost 13 years 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.diff --git a/app/assets/stylesheets/scm.css.erb b/app/assets/stylesheets/scm.css.erb --- a/app/assets/stylesheets/scm.css.erb +++ b/app/assets/stylesheets/scm.css.erb @@ -9,7 +9,7 @@ li.change { list-style-type:none; - background-image: url(../images/bullet_black.png); + background-image: url(<%= asset_path "bullet_black.png" %>); background-position: 1px 1px; background-repeat: no-repeat; padding-top: 1px;
Updated by Toshi MARUYAMA almost 13 years 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 almost 13 years 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 almost 13 years 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
Updated by John Yani almost 13 years ago
Rails 3.2.0 is out
Is there any work break down structure of work required to complete porting Redmine to Rails 3? Are there any routine tasks that unexperienced programmer could help with?
Updated by Toshi MARUYAMA almost 13 years ago
I rebased on r8864.
Changes:
- update Rails 3.2.1.
- rails-dev-tweaks supports Rails 3.2.
Git:
https://bitbucket.org/marutosi/redmine-rails3-straight-20120213-git
- Rails 3.1.3
- Rails 3.2.1
https://github.com/marutosi/redmine/commits/rails3-straight-20120213
- Rails 3.1.3
- Rails 3.2.1
Mercurial:
https://bitbucket.org/marutosi/redmine-rails3-straight-20120213-hg-git
Updated by Sridhar P over 12 years ago
I would like to work on this. I am thinking in the lines of forking on github and submitting pull requests whenever I have completed a significant task. Talking of tasks, is there any list of issues/to-do's that I can work on?
Updated by John Yani over 12 years ago
Sridhar P wrote:
I would like to work on this. I am thinking in the lines of forking on github and submitting pull requests whenever I have completed a significant task. Talking of tasks, is there any list of issues/to-do's that I can work on?
I think you can start with cloning and setting up test environment to see what doesn't work. Then if you manually tested all features and everything seems to work, you can run redmine tests and see if there are any failures. I there are no any, you're done.
Then you can think of how to enable users to use Redmine with both Rails 2 and Rails 3. As of now the work is done/coordinated by Toshi. Seems like every week he rebases his work on the latest revision from svn trunk. AFAIK, there are no any todo lists. But you can look into git/hg log. There are many commits marked as "TODO", so you can review these patches to see what's wrong with them.
Updated by Jean-Philippe Lang over 12 years ago
I have a working copy that runs and passes the full tests suite with Rails 3.1. There's some work to be done in order to provide the current features for Redmine plugins (migrations, view overriding, assets...) but still, most plugins won't be compatible out of the box. And honestly, I'm a bit disappointed with the performance. Redmine is 1.5x to 2x slower than with Rails 2.3. With ruby 1.9.3, it barely runs as fast as current trunk with Rails 2.3 + ruby 1.8.7.
Then you can think of how to enable users to use Redmine with both Rails 2 and Rails 3.
That's not really an option. There are too many changes in Rails 3 to support both versions with the same code base.
Updated by Jean-Philippe Lang over 12 years ago
- File response_time.png response_time.png added
Here are the results of my quick performance tests (Rails 2.3 vs. Rails 3.2):
Updated by Toshi MARUYAMA over 12 years ago
Jean-Philippe Lang wrote:
I have a working copy that runs and passes the full tests suite with Rails 3.1.
Could you create branch and commit to it such as source:sandbox/rails-2.3 ?
Updated by John Yani over 12 years ago
Did anybody find out how to get wiki working? I've got an error:
can't write unknown attribute `versioned_type'
activerecord (3.2.1) lib/active_record/attribute_methods/write.rb:34:in `write_attribute'
activerecord (3.2.1) lib/active_record/attribute_methods/dirty.rb:67:in `write_attribute'
activerecord (3.2.1) lib/active_record/attribute_methods.rb:31:in `[]='
vendor/plugins/acts_as_versioned/lib/acts_as_versioned.rb:383:in `clone_versioned_model'
vendor/plugins/acts_as_versioned/lib/acts_as_versioned.rb:303:in `save_version_on_create'
app/controllers/wiki_controller.rb:154:in `update'
the problem is in the following line:
vendor/plugins/acts_as_versioned/lib/acts_as_versioned.rb
194: self.versioned_inheritance_column = options[:inheritance_column] || "versioned_#{inheritance_column}"
Somehow versioned_type column is missing.
Updated by John Yani over 12 years ago
Update:
Seems like it is because Redmine doesn't use rake tasks provided by acts_as_versioned: create_versioned_table and drop_versioned_table
So, I should add migration field for versioned_type myself
Updated by John Yani over 12 years ago
Here is a patch to enable wiki editing in Rails 3.2.1 https://github.com/marutosi/redmine/pull/6
Updated by Jean-Philippe Lang over 12 years ago
- Target version changed from Candidate for next major release to 2.0.0
Updated by Terence Mill over 12 years ago
Can u explain ur results? For the first look rails 2.3 and ruby 1.9.3 performns best, and not the newest stack with rails 3.
Jean-Philippe Lang wrote:
Here are the results of my quick performance tests (Rails 2.3 vs. Rails 3.2):
Updated by Jean-Philippe Lang over 12 years ago
Terence Mill wrote:
Can u explain ur results? For the first look rails 2.3 and ruby 1.9.3 performns best, and not the newest stack with rails 3.
Indeed, Rails 2.3 performs best as mentionned above. The graph shows the average response times in seconds for a few actions (assets are not involved here). Not much more to explain...
Updated by John Yani over 12 years ago
Terence Mill wrote:
Can u explain ur results? For the first look rails 2.3 and ruby 1.9.3 performns best, and not the newest stack with rails 3.
Here is the detailed explanation:
http://bibwild.wordpress.com/2011/07/12/more-thoughts-on-unbearably-slow-rails3/
Shortly, it is because of extra ruby garbage collection, caused by increased size of the call stack in Rails 3.
Updated by Alex Shulgin over 12 years ago
Hello good sirs.
Any chance of getting this done finally, especially in light of this (rails 2.3 no longer receives security updates from the core team): https://groups.google.com/d/msg/rubyonrails-talk/ZzL90ec7iAQ/368GA-TeQ6AJ ?
--
Regards,
Alex
Updated by Jean-Philippe Lang over 12 years ago
The upgrade to Rails 3.0 is planned for Redmine 2.0 that should be the next major release.
Updated by Terence Mill over 12 years ago
Really waiting for this Release, especially Prototype.js has been replaced with jQuery for ajax calls.
Updated by Toshi MARUYAMA over 12 years ago
Terence Mill wrote:
Really waiting for this Release, especially Prototype.js has been replaced with jQuery for ajax calls.
"prototype-rails" and "prototype_legacy_helper" provide compatibility.
Updated by Etienne Massip over 12 years ago
Terence Mill wrote:
Really waiting for this Release, especially Prototype.js has been replaced with jQuery for ajax calls.
What difference does this make?
Updated by Onno van der Straaten over 12 years ago
Etienne Massip wrote:
Terence Mill wrote:
Really waiting for this Release, especially Prototype.js has been replaced with jQuery for ajax calls.
What difference does this make?
This is also one of the things I would like to see in Redmine 2.0. Upgrading to Rails 3 however does not imply that Redmine 2.0 will use JQuery. I personally doubt that this effort is also about migrating to JQuery.
If you are using Redmine as is it doesn't matter what framework is being used. But if you want to extend Redmine, it does. So for example I added functionality which uses a JQuery Slides (http://slidesjs.com/). Now my 'extended' Redmine installation uses JQuery and not Prototype for some pages. Using Prototype and JQuery in one website is of course not so nice but necessary because JQuery has a lot more to offer.
Updated by Etienne Massip over 12 years ago
Onno van der Straaten wrote:
Using Prototype and JQuery in one website is of course not so nice but necessary because JQuery has a lot more to offer.
Whatever, Redmine has not Javascript API, jQuery and Prototype can coexist very well and I can't see why using 2 tooling frameworks would be bad.
Updated by Terence Mill over 12 years ago
Hmm i hoped we will get rid of prototype because we wanna integrate our SSo Solution for redmine (which is based on CAS) and the problem with redirect on ajax request direct after an revelidation attempt of the SSO gatway (a java servlet filter in front of web.xml war of a jruby redmine tomcat installation), this redirect of an XMLHttpRequest (fired by prototyp.js i think) is not understood by the browser. This leads to "nothing happening" in the application as long a non ajax request is triggered by the request caused by user click.
Our SSO Gateway in front of the redmine can understand jquery ajax requests and wraps them so that the redirect in the browser works. This does not work for prototype js.
There is no documentation where and how often ajax is used in redmine forms, else we could think about moving this urls by filter out of the sso secure area and workawound the problem.
Etienne Massip wrote:
Terence Mill wrote:
Really waiting for this Release, especially Prototype.js has been replaced with jQuery for ajax calls.
What difference does this make?
Updated by Etienne Massip over 12 years ago
Terence Mill wrote:
Our SSO Gateway in front of the redmine can understand jquery ajax requests and wraps them so that the redirect in the browser works. This does not work for prototype js.
What is done with jQuery making the Ajax request understood that you can't do with Prototype?
Updated by Jean-Philippe Lang over 12 years ago
- Status changed from New to Closed
- Assignee set to Jean-Philippe Lang
- % Done changed from 70 to 100
- Resolution set to Fixed
Please open a new ticket for any issue related to Rails3 support.