[GL 6.5] Error 500 while uploading a file
Created by: xarem
When I try to upload a file to an issue or to the wall, I get this error:
Wall:
Started POST "/group/repo/notes" for 127.0.0.1 at 2014-02-19 18:16:38 +0100
Processing by Projects::NotesController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"XYZ", "target_type"=>"wall", "target_id"=>"", "note"=>{"note"=>"XYZ", "attachment"=>#<ActionDispatch::Http::UploadedFile:0x007fba54efa518 @tempfile=#<Tempfile:/tmp/RackMultipart20140219-11443-vv9vl1>, @original_filename="XYZ.zip", @content_type="application/zip", @headers="Content-Disposition: form-data; name=\"note[attachment]\"; filename=\"Assets.zip\"\r\nContent-Type: application/zip\r\n">}, "project_id"=>"group/repo"}
Completed 500 Internal Server Error in 138ms
NameError (uninitialized constant Notes::CreateService):
app/controllers/projects/notes_controller.rb:23:in `create'
app/controllers/application_controller.rb:57:in `set_current_user_for_thread'
Issue:
Started POST "/group/repo/notes" for 127.0.0.1 at 2014-02-19 18:18:18 +0100
Processing by Projects::NotesController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"XYZ", "target_type"=>"", "target_id"=>"", "note"=>{"commit_id"=>"", "noteable_id"=>"129", "noteable_type"=>"Issue", "note"=>"XYZ", "attachment"=>#<ActionDispatch::Http::UploadedFile:0x007fba54ec30e0 @tempfile=#<Tempfile:/tmp/RackMultipart20140219-11449-1g1o1wh>, @original_filename="XYZ.zip", @content_type="application/zip", @headers="Content-Disposition: form-data; name=\"note[attachment]\"; filename=\"Assets.zip\"\r\nContent-Type: application/zip\r\n">}, "project_id"=>"group/repo"}
Completed 500 Internal Server Error in 41ms
NameError (uninitialized constant Notes::CreateService):
app/controllers/projects/notes_controller.rb:23:in `create'
app/controllers/application_controller.rb:57:in `set_current_user_for_thread'
System:
$ sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
System information
System: Ubuntu 12.04
Current User: git
Using RVM: no
Ruby Version: 2.0.0p247
Gem Version: 2.0.3
Bundler Version:1.3.5
Rake Version: 10.1.0
GitLab information
Version: 6.5.1
Revision: 2ffa03a
Directory: /home/git/gitlab
DB Adapter: mysql2
URL: https://git.example.com
HTTP Clone URL: https://git.example.com/some-project.git
SSH Clone URL: [email protected]:some-project.git
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: 1.8.0
Repositories: /home/git/repositories/
Hooks: /home/git/gitlab-shell/hooks/
Git: /usr/bin/git