Defect #11415
closedRedmine doesnt work with rails >3.0.9 (presumably)
0%
Description
lib/plugins/prototype_legacy_helper/lib/prototype_legacy_helper.rb uses remote_function which seems to be removed since the rails 3.0.9: http://apidock.com/rails/ActionView/Helpers/PrototypeHelper/remote_function
rendering news and wiki pages (at least) unusable by rendering a 500 page.
http://www.redmine.org/boards/1/topics/30888 here is a thread where some people already started discussing the issue.
Updated by yac yac over 12 years ago
my trace
Started GET "/projects/kek/wiki" for 127.0.0.1 at Mon Jul 16 21:54:49 +0200 2012
Processing by WikiController#show as HTML
Parameters: {"project_id"=>"kek"}
DEPRECATION WARNING: link_to_function is deprecated and will be removed from Rails 4.0. (called from app_views_attachments_form_html_erb___455534908__623574968 at /www/redmine-vyuka/web/app/views/attachments/_form.html.erb:13)
Rendered attachments/_form.html.erb (6.0ms)
Rendered wiki/edit.html.erb within layouts/base (188.9ms)
Completed 500 Internal Server Error in 240ms
ActionView::Template::Error (undefined method `remote_function' for #<#<Class:0xb5aaea00>:0xb5aacf5c>):
33: </div>
34:
35: <p><%= submit_tag l(:button_save) >
36: <= link_to_remote l(:label_preview),
37: { :url => { :controller => 'wiki', :action => 'preview',
38: :project_id => Herve Harster, :id => @page.title },
39: :method => :post,
lib/plugins/prototype_legacy_helper/lib/prototype_legacy_helper.rb:178:in `link_to_remote'
app/views/wiki/edit.html.erb:36:in `_app_views_wiki_edit_html_erb__89008286__623550738'
app/views/wiki/edit.html.erb:5:in `_app_views_wiki_edit_html_erb__89008286__623550738'
app/controllers/wiki_controller.rb:62:in `show'
Updated by yac yac over 12 years ago
I got it (rendering the template, not the whole redmien) working when packaged like this https://github.com/yaccz/redmine-deb/tree/release/2.0.3_rails3.0.15_patch
Basicly i modified the Gemfile to depend on rails 3.0.9 and not to depend on prototype-rails.
Then i install prototype-rails without dependency checking.
Then i ran into:
/usr/share/redmine_gems-2.0/gems/ruby/1.8/gems/railties-3.0.15/lib/rails/railtie/configuration.rb:77:in `method_missing': undefined method `assets' for #<Rails::Application::Configuration:0xb726e3ac> (NoMethodError)
from /www/redmine-vyuka/web/config/application.rb:46
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /www/redmine-vyuka/web/config/environment.rb:2
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/share/redmine_gems-2.0/gems/ruby/1.8/gems/unicorn-4.3.1/bin/unicorn_rails:144:in `rails_builder'
from /usr/share/redmine_gems-2.0/gems/ruby/1.8/gems/unicorn-4.3.1/lib/unicorn/http_server.rb:696:in `call'
from /usr/share/redmine_gems-2.0/gems/ruby/1.8/gems/unicorn-4.3.1/lib/unicorn/http_server.rb:696:in `build_app!'
from /usr/share/redmine_gems-2.0/gems/ruby/1.8/gems/unicorn-4.3.1/lib/unicorn/http_server.rb:136:in `start'
from /usr/share/redmine_gems-2.0/gems/ruby/1.8/gems/unicorn-4.3.1/bin/unicorn_rails:209
from /usr/share/redmine_gems-2.0/gems/ruby/1.8/bin/unicorn_rails:19:in `load'
from /usr/share/redmine_gems-2.0/gems/ruby/1.8/bin/unicorn_rails:19
So i just commented the config.assets which are generating this
Then i got one more error:
/usr/share/redmine_gems-2.0/gems/ruby/1.8/gems/activesupport-3.0.15/lib/active_support/core_ext/module/aliasing.rb:31:in `alias_method': undefined method `assign_attributes' for class `Issue' (NameError)
from /usr/share/redmine_gems-2.0/gems/ruby/1.8/gems/activesupport-3.0.15/lib/active_support/core_ext/module/aliasing.rb:31:in `alias_method_chain'
from /www/redmine-vyuka/web/app/models/issue.rb:286
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/share/redmine_gems-2.0/gems/ruby/1.8/gems/activesupport-3.0.15/lib/active_support/dependencies.rb:242:in `require'
from /usr/share/redmine_gems-2.0/gems/ruby/1.8/gems/activesupport-3.0.15/lib/active_support/dependencies.rb:227:in `load_dependency'
from /usr/share/redmine_gems-2.0/gems/ruby/1.8/gems/activesupport-3.0.15/lib/active_support/dependencies.rb:242:in `require'
from /usr/share/redmine_gems-2.0/gems/ruby/1.8/gems/activesupport-3.0.15/lib/active_support/dependencies.rb:350:in `require_or_load'
from /usr/share/redmine_gems-2.0/gems/ruby/1.8/gems/activesupport-3.0.15/lib/active_support/dependencies.rb:304:in `depend_on'
from /usr/share/redmine_gems-2.0/gems/ruby/1.8/gems/activesupport-3.0.15/lib/active_support/dependencies.rb:216:in `require_dependency'
from /usr/share/redmine_gems-2.0/gems/ruby/1.8/gems/railties-3.0.15/lib/rails/engine.rb:138:in `eager_load!'
from /usr/share/redmine_gems-2.0/gems/ruby/1.8/gems/railties-3.0.15/lib/rails/engine.rb:137:in `each'
from /usr/share/redmine_gems-2.0/gems/ruby/1.8/gems/railties-3.0.15/lib/rails/engine.rb:137:in `eager_load!'
from /usr/share/redmine_gems-2.0/gems/ruby/1.8/gems/railties-3.0.15/lib/rails/engine.rb:135:in `each'
from /usr/share/redmine_gems-2.0/gems/ruby/1.8/gems/railties-3.0.15/lib/rails/engine.rb:135:in `eager_load!'
from /usr/share/redmine_gems-2.0/gems/ruby/1.8/gems/railties-3.0.15/lib/rails/application.rb:108:in `eager_load!'
from /usr/share/redmine_gems-2.0/gems/ruby/1.8/gems/railties-3.0.15/lib/rails/application/finisher.rb:41
from /usr/share/redmine_gems-2.0/gems/ruby/1.8/gems/railties-3.0.15/lib/rails/initializable.rb:25:in `instance_exec'
from /usr/share/redmine_gems-2.0/gems/ruby/1.8/gems/railties-3.0.15/lib/rails/initializable.rb:25:in `run'
from /usr/share/redmine_gems-2.0/gems/ruby/1.8/gems/railties-3.0.15/lib/rails/initializable.rb:50:in `run_initializers'
from /usr/share/redmine_gems-2.0/gems/ruby/1.8/gems/railties-3.0.15/lib/rails/initializable.rb:49:in `each'
from /usr/share/redmine_gems-2.0/gems/ruby/1.8/gems/railties-3.0.15/lib/rails/initializable.rb:49:in `run_initializers'
from /usr/share/redmine_gems-2.0/gems/ruby/1.8/gems/railties-3.0.15/lib/rails/application.rb:134:in `initialize!'
from /usr/share/redmine_gems-2.0/gems/ruby/1.8/gems/railties-3.0.15/lib/rails/application.rb:77:in `send'
from /usr/share/redmine_gems-2.0/gems/ruby/1.8/gems/railties-3.0.15/lib/rails/application.rb:77:in `method_missing'
from /www/redmine-vyuka/web/config/environment.rb:14
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/share/redmine_gems-2.0/gems/ruby/1.8/gems/unicorn-4.3.1/bin/unicorn_rails:144:in `rails_builder'
from /usr/share/redmine_gems-2.0/gems/ruby/1.8/gems/unicorn-4.3.1/lib/unicorn/http_server.rb:696:in `call'
from /usr/share/redmine_gems-2.0/gems/ruby/1.8/gems/unicorn-4.3.1/lib/unicorn/http_server.rb:696:in `build_app!'
from /usr/share/redmine_gems-2.0/gems/ruby/1.8/gems/unicorn-4.3.1/lib/unicorn/http_server.rb:136:in `start'
from /usr/share/redmine_gems-2.0/gems/ruby/1.8/gems/unicorn-4.3.1/bin/unicorn_rails:209
from /usr/share/redmine_gems-2.0/gems/ruby/1.8/bin/unicorn_rails:19:in `load'
from /usr/share/redmine_gems-2.0/gems/ruby/1.8/bin/unicorn_rails:19
So again, i just commented the alias_method calls
Then my unicorn successfully started and i could access my project and the projects wiki in browser.
Updated by yac yac over 12 years ago
- Status changed from New to Resolved
So, the prototype-rails project actualy defines the missing function.
But my installation was missing .bundle, Gemfile and Gemfile.lock. Which caused it not to load the PrototypeRails module rendering the first trace in here.
Thanks to find this out to wmoxam.
Updated by Etienne Massip over 12 years ago
- Status changed from Resolved to Closed
- Resolution set to Invalid