Rails 2.3.5 + Rails 3 gems in the same gemset == Redmine crashes
Added by Kai Schlamp over 14 years ago
Hi.
I am pretty new to ruby (and those gems) and rails. Until now I thought that all rails application have some kind of integrated version management (RAILS_GEM_VERSION in Rails 2 and gem 'rails' in Rails 3). And therefore I thought that having Rails 2 and Rails 3 in the same gem repository (in my case gemset under rvm) wouldn't be a problem. But Redmine doesn't allow that (Rails 2 and Rails 3 in the same gemset). It crashes when trying to access the account or user pages (see error trace below). But only when accessing those pages (everything else seems to run ok, although I didn't test it a lot). Why that? When removing the Rails 3 gems everything works ok again.
Best regards,
Kai
Processing MyController#account (for x.x.x.x at 2010-08-13 17:15:52) [GET] Parameters: {"action"=>"account", "controller"=>"my"} Rendering template within layouts/base Rendering my/account DEPRECATION WARNING: using %d in messages is deprecated; use {{count}} instead.. (called from interpolate at /var/www/vhosts/mydomain.org/.rvm/gems/ruby-1.8.7-p299/gems/activerecord-2.3.5/lib/active_record/i18n_interpolation_deprecation.rb:17) ActionView::TemplateError (missing interpolation argument in "%m/%{count}/%Y %I:%M %p" ({:object=>Fri Aug 13 16:15:41 +0200 2010} given)) on line #4 of app/views/my/_sidebar.rhtml: 1: <h3><%=l(:label_my_account)%></h3> 2: 3: <p><%=l(:field_login)%>: <strong><%= @user.login %></strong><br /> 4: <%=l(:field_created_on)%>: <%= format_time(@user.created_on) %></p> 5: 6: 7: <h4><%= l(:label_feeds_access_key) %></h4> /var/www/vhosts/mydomain.org/.rvm/gems/ruby-1.8.7-p299/gems/i18n-0.4.1/lib/i18n/backend/base.rb:186:in `interpolate_without_deprecated_syntax' /var/www/vhosts/mydomain.org/.rvm/gems/ruby-1.8.7-p299/gems/i18n-0.4.1/lib/i18n/backend/base.rb:49:in `translate' /var/www/vhosts/mydomain.org/.rvm/gems/ruby-1.8.7-p299/gems/i18n-0.4.1/lib/i18n.rb:152:in `t' /var/www/vhosts/mydomain.org/.rvm/gems/ruby-1.8.7-p299/gems/i18n-0.4.1/lib/i18n/backend/base.rb:62:in `localize' /var/www/vhosts/mydomain.org/.rvm/gems/ruby-1.8.7-p299/gems/i18n-0.4.1/lib/i18n.rb:231:in `l' lib/redmine/i18n.rb:48:in `format_time' app/views/my/_sidebar.rhtml:4:in `_run_rhtml_app47views47my47_sidebar46rhtml_locals_object_sidebar' app/views/my/account.rhtml:59:in `_run_rhtml_app47views47my47account46rhtml' app/helpers/application_helper.rb:764:in `content_for' app/views/my/account.rhtml:58:in `_run_rhtml_app47views47my47account46rhtml' /var/www/vhosts/mydomain.org/.rvm/rubies/ruby-1.8.7-p299/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' /var/www/vhosts/mydomain.org/.rvm/rubies/ruby-1.8.7-p299/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' /var/www/vhosts/mydomain.org/.rvm/rubies/ruby-1.8.7-p299/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' /var/www/vhosts/mydomain.org/.rvm/rubies/ruby-1.8.7-p299/lib/ruby/1.8/webrick/server.rb:162:in `start' /var/www/vhosts/mydomain.org/.rvm/rubies/ruby-1.8.7-p299/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' /var/www/vhosts/mydomain.org/.rvm/rubies/ruby-1.8.7-p299/lib/ruby/1.8/webrick/server.rb:95:in `start' /var/www/vhosts/mydomain.org/.rvm/rubies/ruby-1.8.7-p299/lib/ruby/1.8/webrick/server.rb:92:in `each' /var/www/vhosts/mydomain.org/.rvm/rubies/ruby-1.8.7-p299/lib/ruby/1.8/webrick/server.rb:92:in `start' /var/www/vhosts/mydomain.org/.rvm/rubies/ruby-1.8.7-p299/lib/ruby/1.8/webrick/server.rb:23:in `start' /var/www/vhosts/mydomain.org/.rvm/rubies/ruby-1.8.7-p299/lib/ruby/1.8/webrick/server.rb:82:in `start' Rendering /var/www/vhosts/mydomain.org/rails/redmine-1.0/public/500.html (500 Internal Server Error)
Replies (3)
RE: Rails 2.3.5 + Rails 3 gems in the same gemset == Redmine crashes - Added by Diego Felipe over 14 years ago
I have this same problem now. But removing rails 3.0.0 didn't work. What exactly did you do?
RE: Rails 2.3.5 + Rails 3 gems in the same gemset == Redmine crashes - Added by Diego Felipe over 14 years ago
With these gems it works:
- LOCAL GEMS ***
actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
builder (2.1.2)
bundler (1.0.0)
pg (0.9.0)
postgres-pr (0.6.3)
rack (1.0.1)
rails (2.3.5)
rake (0.8.7)
rcov (0.9.8)
RE: Rails 2.3.5 + Rails 3 gems in the same gemset == Redmine crashes - Added by Felix Schäfer over 14 years ago
The problem is with the i18n gem, it's required in version 0.4 or higher (I think) by rails 3, but redmine won't work with i18n 0.4 or higher. The other problem is that redmine just loads i18n, not specifying what version it needs. You can either uninstall all 0.4 and higher versions of i18n and install the latest non-0.4 version (should be gem install i18n -v=0.3.7
if memory serves), or search for the already existing bug report for that issue, that I think had a patch to prevent redmine from loading the too high version of i18n.