Closed rg-ac closed 8 years ago
I've the same problem with RVM/ruby 2.0.0-p643
After adding the RedCloth GEM to the Gemfile (instead of using 'bundle exec gem install RedCloth') and executing 'bundle install --without development test' I can create a PDF from a single Wiki page. But as soon I add a link to a second page via [[PageName]] I see a server error with the following in the logfile: NoMethodError (undefined method 'redirects_to' for #..
Now with ruby 2.2.4 and Redmine 3.2.1 still the same problem while building a PDF with a wiki page with a internal page reference ([[PageName]]):
Started GET "/doc_pu/build_remote?id=4&project_id=demo" for 10.1.1.116 at 2016-04-05 16:42:40 +0200 Processing by DocPuController#build_remote as JS Parameters: {"id"=>"4", "project_id"=>"demo"} Current user: tuser (id=5) Completed 500 Internal Server Error in 38ms (ActiveRecord: 16.9ms)
NoMethodError (undefined method redirect_to' for #<ActiveRecord::Relation []>): plugins/redmine_doc_pu/lib/latex_wiki_page.rb:36:in
block in to_latex'
plugins/redmine_doc_pu/lib/latex_wiki_page.rb:31:in gsub!' plugins/redmine_doc_pu/lib/latex_wiki_page.rb:31:in
to_latex'
plugins/redmine_doc_pu/app/models/doc_pu_wiki_page.rb:24:in to_latex' plugins/redmine_doc_pu/lib/latex_doc.rb:65:in
block in to_latex'
plugins/redmine_doc_pu/lib/latex_doc.rb:64:in to_latex' plugins/redmine_doc_pu/lib/latex_doc.rb:115:in
build'
plugins/redmine_doc_pu/app/models/doc_pu_document.rb:27:in build' plugins/redmine_doc_pu/app/controllers/doc_pu_controller.rb:101:in
build_remote'
lib/redmine/sudo_mode.rb:63:in `sudo_mode'
Sorry for this late reply. I'am not at this project mainly. I think, the cross page refs are not working at all at this moment. Sorry. Not a feature we need. Are you interested to fix this by yourself?
I can inform you by now: Your issue was fixed with commit be24978d0e49f7fe8dac8db939e6aa2eec87e7de.
My test-environment is:
The Plugin can be configured and I can compose a document definition. But as soon as I press on the 'Build' link I see an 'Internal error' and inside the production log I found:
Completed 500 Internal Server Error in 46ms (ActiveRecord: 17.5ms)
NoMethodError (undefined method
redirects_to' for #<ActiveRecord::Relation []>): lib/redmine/sudo_mode.rb:63:in
sudo_mode'