Project

General

Profile

Error 500 after upgrading to 1.4

Added by рустам салаватов almost 12 years ago

I just finished upgrading from 1.3 to 1.4 on Debian 6.
my installation problem http://www.redmine.org/boards/2/topics/29993?r=30005#message-30005

When I try to access "new issue" the request fails (500) and the following is posted to the production.log:

ActionView::TemplateError (undefined method `saved_attachments' for #<Issue:0x7f7a4bf641f0>) on line #1 of app/views/attachments/_form.html.erb:
1: <% if defined?(container) && container && container.saved_attachments >
2: <
container.saved_attachments.each_with_index do |attachment, i| >
3: <span class="icon icon-attachment" style="display:block; line-height:1.5em;">
4: <
= h(attachment.filename) > (<= number_to_human_size(attachment.filesize) %>)

app/views/attachments/_form.html.erb:1
app/views/issues/new.html.erb:21
app/helpers/application_helper.rb:934:in `labelled_form_for'
app/views/issues/new.html.erb:5
app/controllers/issues_controller.rb:130:in `new'
app/controllers/issues_controller.rb:129:in `new'
/usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:92: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:418:in `start_request_handler'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:358: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:354: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:213: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 /var/www/3ds/data/www/...../public/500.html (500 Internal Server Error)


Replies (11)

RE: Error 500 after upgrading to 1.4 - Added by рустам салаватов almost 12 years ago

and

Processing ActivitiesController#index (for ...... at 2012-04-15 23:24:34) [GET]
Parameters: {"action"=>"index", "id"=>"arios", "controller"=>"activities"}

NameError (uninitialized constant Redmine::Acts::ActivityProvider::InstanceMethods::ClassMethods::ARCondition):
lib/redmine/activity/fetcher.rb:76:in `events'
lib/redmine/activity/fetcher.rb:75:in `each'
lib/redmine/activity/fetcher.rb:75:in `events'
lib/redmine/activity/fetcher.rb:74:in `each'
lib/redmine/activity/fetcher.rb:74:in `events'
app/controllers/activities_controller.rb:41:in `index'
/usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:92: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:418:in `start_request_handler'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:358: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:354: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:213: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 /var/www/3ds/data/www/...../public/500.html (500 Internal Server Error)

RE: Error 500 after upgrading to 1.4 - Added by рустам салаватов almost 12 years ago

and

Processing IssuesController#create (for ..... at 2012-04-15 23:28:07) [POST]
Parameters: {"project_id"=>"arios", "action"=>"create", "authenticity_token"=>"iHPyHGzxS5ez7CmotK4bXFJSNgu1ZVQ9uUVGV6R7TJI=", "issue"=>{"start_date"=>"2012-04-15", "custom_field_values"=>{"1"=>"100"}, "estimated_hours"=>"", "parent_issue_id"=>"", "priority_id"=>"4", "is_private"=>"0", "done_ratio"=>"0", "assigned_to_id"=>"", "subject"=>"", "tracker_id"=>"2", "due_date"=>"", "status_id"=>"1", "description"=>""}, "controller"=>"issues", "new_checklist"=>"", "attachments"=>{"1"=>{"description"=>""}}}

NoMethodError (undefined method `save_attachments' for #<Issue:0x7f0f205245a0>):
app/controllers/issues_controller.rb:147:in `create'
/usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:92: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:418:in `start_request_handler'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:358: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:354: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:213: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 /var/www/3ds/data/www/...../public/500.html (500 Internal Server Error)

RE: Error 500 after upgrading to 1.4 - Added by Etienne Massip almost 12 years ago

Might be a plugin issue?

RE: Error 500 after upgrading to 1.4 - Added by Nabil Faouzi almost 12 years ago

I have the same problems! many plugins failed with upgrade to 1.4 and many controller rendering non route matches so i've remove lots of them.

But this error still persist. What i should do?

ActionView::TemplateError (undefined method `saved_attachments' for #<Issue:0x7f0b5ecf0178>) on line #1 of app/views/attachments/_form.html.erb:
1: <% if defined?(container) && container && container.saved_attachments %>
2:   <% container.saved_attachments.each_with_index do |attachment, i| %>
3:     <span class="icon icon-attachment" style="display:block; line-height:1.5em;">
4:       <%= h(attachment.filename) %> (<%= number_to_human_size(attachment.filesize) %>)

    app/views/attachments/_form.html.erb:1
    app/views/issues/new.html.erb:21
    app/helpers/application_helper.rb:934:in `labelled_form_for'
    app/views/issues/new.html.erb:5

Thanks

RE: Error 500 after upgrading to 1.4 - Added by Nabil Faouzi almost 12 years ago

Like "рустам салаватов" i couldn't post / see any issue on a project.

rocessing IssuesController#show (for 165.7.122.211 at 2012-04-19 11:11:58) [GET]
  Parameters: {"action"=>"show", "id"=>"50", "controller"=>"issues"}
Rendering template within layouts/base
Rendering issues/show

ActionView::TemplateError (undefined method `saved_attachments' for #<Issue:0x7f969fd30e40>) on line #1 of app/views/attachments/_form.html.erb:
1: <% if defined?(container) && container && container.saved_attachments %>
2:   <% container.saved_attachments.each_with_index do |attachment, i| %>
3:     <span class="icon icon-attachment" style="display:block; line-height:1.5em;">
4:       <%= h(attachment.filename) %> (<%= number_to_human_size(attachment.filesize) %>)

    app/views/attachments/_form.html.erb:1
    app/views/issues/_edit.html.erb:34

And when i wan't show activities on a project:

Processing ActivitiesController#index (for 165.7.122.211 at 2012-04-19 11:11:44) [GET]
  Parameters: {"action"=>"index", "id"=>"gifn-nova", "controller"=>"activities"}

NameError (uninitialized constant Redmine::Acts::ActivityProvider::InstanceMethods::ClassMethods::ARCondition):
  lib/redmine/activity/fetcher.rb:76:in `events'
  lib/redmine/activity/fetcher.rb:75:in `each'
  lib/redmine/activity/fetcher.rb:75:in `events'
  lib/redmine/activity/fetcher.rb:74:in `each'
  lib/redmine/activity/fetcher.rb:74:in `events'
  app/controllers/activities_controller.rb:41:in `index'
  passenger (2.2.15) lib/phusion_passenger/rack/request_handler.rb:92:in `process_request'
  passenger (2.2.15) lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
  passenger (2.2.15) lib/phusion_passenger/railz/application_spawne

My configuration CentOS 6 / Ruby 1.8.7 /Passenger 2.2.15 :

[root@cnp31redmine redmine-1.4.0]# bundle show
Gems included by the bundle:
  * actionmailer (2.3.14)
  * actionpack (2.3.14)
  * activerecord (2.3.14)
  * activeresource (2.3.14)
  * activesupport (2.3.14)
  * bundler (1.0.21)
  * fastercsv (1.5.0)
  * i18n (0.6.0)
  * net-ldap (0.3.1)
  * pg (0.13.2)
  * rack (1.1.1)
  * rails (2.3.14)
[root@cnp31redmine redmine-1.4.0]# RAILS_ENV=production script/about
About your application's environment
Ruby version              1.8.7 (x86_64-linux)
RubyGems version          1.3.7
Rack version              1.1.1
Rails version             2.3.14
Active Record version     2.3.14
Active Resource version   2.3.14
Action Mailer version     2.3.14
Active Support version    2.3.14
Application root          /var/www/redmine/redmine-1.4.0
Environment               production
Database adapter          postgresql
Database schema version   20120301153455

About your Redmine plugins
Redmine - Ldap Sync                 1.1.0
Redmine Logs plugin                 0.0.3
Redmine Better Gantt Chart plugin   0.5.5
Redmine Api plugin                  0.0.1
Redmine Close Button plugin         0.0.7
Redmine Auto Done 100%              0.0.1
Redmine Theme Changer plugin        0.0.5
Redmine Banner plugin               0.0.6

Thanks

RE: Error 500 after upgrading to 1.4 - Added by Etienne Massip almost 12 years ago

Di you run your migration as stated in RedmineUpgrade?

RE: Error 500 after upgrading to 1.4 - Added by рустам салаватов almost 12 years ago

im new install, and reinstall plugins...all ok
upgrade - no OK

RE: Error 500 after upgrading to 1.4 - Added by Jean-Philippe Lang almost 12 years ago

These errors show that you have some outdated Redmine core plugins (eg. acts_as_attachable) in vendor/plugins. Please, use a fresh tarball/checkout of Redmine 1.4.0.

RE: Error 500 after upgrading to 1.4 - Added by Nabil Faouzi almost 12 years ago

Thanks,

Indeed i was copy last core plugins into the new installations...

Thank You

RE: Error 500 after upgrading to 1.4 - Added by Nabil Faouzi almost 12 years ago

I have other problems with authentication of members:

All members should be authenticate by LDap but when someone try to connect to his redmine page, he show an internal error(error 500).

ArgumentError (wrong number of arguments (1 for 2)):
  app/controllers/account_controller.rb:143:in `password_authentication'
  app/controllers/account_controller.rb:138:in `authenticate_user'
  app/controllers/account_controller.rb:30:in `login'
  passenger (2.2.15) lib/phusion_passenger/rack/request_handler.rb:92:in `process_request'
  passenger (2.2.15) lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
  passenger (2.2.15) lib/phusion_passenger/railz/application_spawner.rb:441:in `start_request_handler'
  passenger (2.2.15) lib/phusion_passenger/railz/application_spawner.rb:381:in `handle_spawn_application'
  passenger (2.2.15) lib/phusion_passenger/utils.rb:252:in `safe_fork'
  passenger (2.2.15) lib/phusion_passenger/railz/application_spawner.rb:377:in `handle_spawn_application'
  passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
  passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
  passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
  passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:163:in `start'
  passenger (2.2.15) lib/phusion_passenger/railz/application_spawner.rb:222:in `start'
  passenger (2.2.15) lib/phusion_passenger/spawn_manager.rb:253:in `spawn_rails_application'
  passenger (2.2.15) lib/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
  passenger (2.2.15) lib/phusion_passenger/spawn_manager.rb:247:in `spawn_rails_application'
  passenger (2.2.15) lib/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'

What does mean wrong number of argument?

RE: Error 500 after upgrading to 1.4 - Added by Nabil Faouzi almost 12 years ago

Ok the problem was resolved :)

This error is caused by the plugin "ldap sync", my ldap used for authentication of members was in sametime actived for synchronisation of users...

If someone is in this case, he should disabled the option "active" in synchronisation option...

Thanks.

    (1-11/11)