bshaffer / redmine-assets-plugin

Provides a central location to view all your project's assets
24 stars 13 forks source link

ActionView::TemplateError (assets_by_type_url failed to generate from {:type=>"Issue", :controller=>"assets", :project_id=>"xxx", :action=>"by_type"}, expected: {:controller=>:assets, :action=>:by_type}, diff: {:type=>"Issue", :controller=>:assets, :proje #13

Open apricoti opened 12 years ago

apricoti commented 12 years ago

This seems to be different than bug #3. I downloaded the source from git today.

After installing the plugin and migrating the db, accessing the redmine URL /projects/xxx/assets gives an error 500. Contents of my log file /var/log/redmine/default/production.log below:

Processing AssetsController#index (for 10.19.160.229 at 2012-04-10 10:13:35) [GET]
Parameters: {"project_id"=>"xxx", "action"=>"index", "controller"=>"assets"}
Rendering template within layouts/base
Rendering assets/index

ActionView::TemplateError (assets_by_type_url failed to generate from {:type=>"Issue", :controller=>"assets", :project_id=>"xxx", :action=>"by_type"}, expected: {:controller=>:assets, :action=>:by_type}, diff: {:type=>"Issue", :controller=>:assets, :project_id=>"xxx", :action=>:by_type}) on line #6 of  vendor/plugins/redmine_assets_plugin/app/views/assets/index.html.erb:
3:   <% if !@types.blank? %>
4:   <ul class="assets-list">
5:     <% for type in @types %>
6:       <li><%= link_to l(@mappings[type]['i18n'].nil? ? 'label_'+type.underscore : @mappings[type]['i18n']) + ' ' + l(:label_asset_plural), assets_by_type_path(:type => type, :project_id => params[:project_id]) %></li>
7:     <% end %>
8:   </ul>
9:   <% else %>

vendor/rails/actionpack/lib/action_controller/routing/route_set.rb:381:in `raise_named_route_error'
vendor/rails/actionpack/lib/action_controller/routing/route_set.rb:345:in `generate'
vendor/rails/actionpack/lib/action_controller/url_rewriter.rb:208:in `rewrite_path'
vendor/rails/actionpack/lib/action_controller/url_rewriter.rb:187:in `rewrite_url'
vendor/rails/actionpack/lib/action_controller/url_rewriter.rb:165:in `rewrite'
vendor/rails/actionpack/lib/action_controller/base.rb:626:in `url_for'
vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb:86:in `send'
vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb:86:in `url_for'
(eval):18:in `assets_by_type_path'
vendor/plugins/redmine_assets_plugin/app/views/assets/index.html.erb:6
vendor/plugins/redmine_assets_plugin/app/views/assets/index.html.erb:5:in `each'
vendor/plugins/redmine_assets_plugin/app/views/assets/index.html.erb:5
vendor/rails/actionpack/lib/action_view/renderable.rb:39:in `send'
vendor/rails/actionpack/lib/action_view/renderable.rb:39:in `render'
vendor/rails/actionpack/lib/action_view/template.rb:73:in `render_template'
vendor/rails/actionpack/lib/action_view/base.rb:256:in `render'
vendor/rails/actionpack/lib/action_view/base.rb:369:in `_render_with_layout'
vendor/rails/actionpack/lib/action_view/base.rb:254:in `render'
vendor/rails/actionpack/lib/action_controller/base.rb:1177:in `render_for_file'
vendor/rails/actionpack/lib/action_controller/base.rb:896:in `render_without_benchmark'
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:51:in `render'
vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:8:in `realtime'
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:51:in `render'
vendor/rails/actionpack/lib/action_controller/base.rb:868:in `render_without_benchmark'
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:51:in `render'
vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:8:in `realtime'
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:51:in `render'
vendor/rails/actionpack/lib/action_controller/base.rb:1251:in `default_render'
vendor/rails/actionpack/lib/action_controller/base.rb:1257:in `perform_action_without_filters'
vendor/rails/actionpack/lib/action_controller/filters.rb:617:in `call_filters'
vendor/rails/actionpack/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark'
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
vendor/rails/actionpack/lib/action_controller/rescue.rb:136:in `passenger_orig_perform_action'
/usr/lib/ruby/1.8/phusion_passenger/railz/request_handler.rb:65:in `perform_action'
vendor/rails/actionpack/lib/action_controller/base.rb:524:in `send'
vendor/rails/actionpack/lib/action_controller/base.rb:524:in `process_without_filters'
vendor/rails/actionpack/lib/action_controller/filters.rb:606:in `process_without_session_management_support'
vendor/rails/actionpack/lib/action_controller/session_management.rb:134:in `process_without_test'
vendor/rails/actionpack/lib/action_controller/test_process.rb:18:in `process'
vendor/rails/actionpack/lib/action_controller/base.rb:392:in `process'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:184:in `handle_request'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:112:in `dispatch_unlocked'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:125:in `dispatch'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:124:in `synchronize'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:124:in `dispatch'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:134:in `dispatch_cgi'
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:41:in `dispatch'
/usr/lib/ruby/1.8/phusion_passenger/railz/request_handler.rb:50: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 /usr/share/redmine/public/500.html (500 Internal Server Error)

bshaffer commented 12 years ago

Could you tell me what version of rails / redmine you are using?