Project

General

Profile

Actions

Defect #1150

closed

Cannot upload any file due to NoMethodError

Defect #1150: Cannot upload any file due to NoMethodError

Added by Andrea Colleoni over 18 years ago. Updated over 18 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Attachments
Target version:
-
Resolution:
Invalid
Affected version:

Description

In any of the sections where it is possible to attach a file I get the following error; the log says:

Processing ProjectsController#add_file (for 10.0.0.51 at 2008-04-30 16:59:24) [POST]
Session ID: 8c3a0afca9fb80fa47fe03e5bf72e6da
Parameters: {"commit"=>"Aggiungi", "action"=>"add_file", "id"=>"proj", "controller"=>"projects", "version_id"=>"16", "attachments"=>{"1"=>{"description"=>"Kick-off", "file"=>#<File:C:/DOCUME~1/ADMINI~1/IMPOST~1/Temp/CGI.1280.1>}}}

NoMethodError (undefined method `description=' for #<Attachment:0x6f5692c>):
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.6/lib/active_record/base.rb:1860:in `method_missing'
.....
I'm now using the 1388 revision, but I noticed the failure since about revision 1300.

Updated by Andrea Colleoni over 18 years ago Actions #1

I'm sorry but I'm quite new to Ruby on Rails... Reading RedMine docs, I've upgraded rails to 2.0.2 anyway the problem still persists:

Processing ProjectsController#add_file (for 10.0.0.51 at 2008-04-30 17:54:17) [POST]
Session ID: 8c3a0afca9fb80fa47fe03e5bf72e6da
Parameters: {"commit"=>"Aggiungi", "action"=>"add_file", "id"=>"proj", "controller"=>"projects", "version_id"=>"16", "attachments"=>{"1"=>{"description"=>"Kick-off", "file"=>#<File:C:/DOCUME~1/ADMINI~1/IMPOST~1/Temp/CGI.836.1>}}}

NoMethodError (undefined method `description=' for #<Attachment:0x6f8a510>):
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/attribute_methods.rb:200:in `method_missing'
.....

Thanks a lot for this very useful project.

Updated by Jean-Philippe Lang over 18 years ago Actions #2

  • Status changed from New to Closed
  • Resolution set to Invalid

You forgot to migrate your database after an upgrade. See RedmineUpgrade.
Reopen if needed.

Actions

Also available in: PDF Atom