zipme/redmine_lightbox

attachment path errors

Closed this issue · 2 comments

I have recently installed the lightbox plugin on our Redmine server and get the following error in my production log when trying to access an issue with an attachment.

Processing IssuesController#show (for 24.18.232.68 at 2011-12-13 22:32:41) [GET]
Parameters: {"action"=>"show", "id"=>"820", "controller"=>"issues"}
Rendering template within layouts/base
Rendering issues/show.rhtml

ActionView::TemplateError (undefined method `attachment_path' for #ActionView::Base:0x2aac319260f0) on line #12 of vendor/plugins/redmine_lightbox/app/views/attachments/_links.rhtml:
9: <% end -%>
10:
11: <% if options[:deletable] %>
12: <%= link_to image_tag('delete.png'), attachment_path(attachment),
13: :confirm => l(:text_are_you_sure),
14: :method => :delete,
15: :class => 'delete',

vendor/plugins/redmine_lightbox/app/views/attachments/_links.rhtml:12:in `_run_rhtml_vendor47plugins47redmine_lightbox47app47views47attachments47_links46rhtml_locals_attachments_links_object_options'
vendor/plugins/redmine_lightbox/app/views/attachments/_links.rhtml:2:in `_run_rhtml_vendor47plugins47redmine_lightbox47app47views47attachments47_links46rhtml_locals_attachments_links_object_options'
app/helpers/attachments_helper.rb:27:in `link_to_attachments'
app/views/issues/show.rhtml:60:in `_run_rhtml_app47views47issues47show46rhtml'
app/controllers/issues_controller.rb:122
app/controllers/issues_controller.rb:121:in `show'
/usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:95:in `process_request'
/usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:374:in `start_request_handler'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:332:in `handle_spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/utils.rb:184:in `safe_fork'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:330:in `handle_spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:163:in `start'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:209:in `start'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
/usr/lib/phusion_passenger/passenger-spawn-server:61

Rendering /home/rails/redmine-1.2/public/500.html (500 Internal Server Error)

check this issue #26

thanks! that was it.