zipme / redmine_lightbox

Lightbox for image attachments
MIT License
116 stars 119 forks source link

throws 500 internal server error in Bitnami 1.2.1 #26

Open anandakmanchi opened 12 years ago

anandakmanchi commented 12 years ago

I installed this in bitnami 1.2.1 stack, ran a db:migrate and restarted

now i get a 500 internal server error whenever i try to open an existing issue or create a new one with attachment

existing issues without attachments work fine though.

here is the log

Processing IssuesController#show (for 172.30.5.10 at 2011-12-12 21:20:36) [GET] Parameters: {"action"=>"show", "id"=>"139", "controller"=>"issues"} Rendering template within layouts/base Rendering issues/show.rhtml

ActionView::TemplateError (undefined method `attachment_path' for #ActionView::Base:0x6671760) 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:in `show'
app/controllers/issues_controller.rb:121:in `show'
config/initializers/mongrel_cluster_with_rails_211_fix.rb:62:in `dispatch_cgi'

Rendering C:/Program Files/BitNami Redmine Stack/apps/redmine/public/500.html (500 Internal Server Error)

anandakmanchi commented 12 years ago

just wanted to let you know that this plugin is great and can be really helpful for us if we can get it to work.

zipme commented 12 years ago

You may have to upgrade your redmine to the lastest version or use the last version of this plugin,

You can download the last version here https://github.com/zipme/redmine_lightbox/zipball/7cd1d66d54f267015dcd0b0d0eadab251918de1d

You can also check this commit for more info about this change: https://github.com/edavis10/redmine/commit/885605b439dec39b23d2043c436d03b447ad919c

anandakmanchi commented 12 years ago

WOW!!

it works. Thank you so much. i just checked with existing and new issues.

thanks again for the prompt response. i'm delighted.

yecine06 commented 12 years ago

Hello,

I'm having the same issue, i am on the latest revision of the plugin and on Redmine 1.2.2.devel (MySQL) (i don't want to update to 1.3.0 yet)

here are some infos on my environment

About your application's environment Ruby version 1.8.7 (i686-linux) RubyGems version 1.6.0 Rack version 1.1.2 Rails version 2.3.11 Active Record version 2.3.11 Active Resource version 2.3.11 Action Mailer version 2.3.11 Active Support version 2.3.11 Application root /home/.sites/28/site1/vhosts/redmine/htdocs Environment production Database adapter mysql Database schema version 20110902000000

About your Redmine plugins Redmine Code Review plugin 0.4.5 Redmine Pidoco Integration plugin 1.0 Redmine Gitrevision Download plugin 0.0.8 Redmine Light Box plugin 0.0.1 Redmine Spent Time Column 1.1.0 Redmine Auto Done 100% 0.0.1 Redcase 1.0 alpha 0.144 Redmine Time Tracker plugin 0.4 Redmine Spent Time Required 0.0.1 Redmine Logs plugin 0.0.2 Redmine Backlogs v0.6.20 Redmine Graphs plugin 0.1.0

cforce commented 12 years ago

Same here!

derEremit commented 12 years ago

same experience with chili-project 3.0 if that's of any interest ;)

beneggett commented 12 years ago

For those on Chiliproject, There is a difference in the way that Chiliproject is treating the attachments_path, I solved it simply here => f656abb593f181773c4af0eabd083acc6e59caf6

Don't know if zipme wants to pull this into a chiliproject branch until the two are merged, or not. That's the authors choice.

Best,

Ben

beneggett commented 12 years ago

I suppose the above would likely solve it in older versions of Redmine, but I have not confirmed.

tonthon commented 12 years ago

Using Chiliproject, we had the same trouble, I can confirm the modification provided solve the issue for us thanks.