Jen wrote in post #999450:
>   ArgumentError in UploadController#create
>
> wrong number of arguments (0 for 1)

Ruby is telling you what the problem. For example, take a look at the 
following:

--------------------
def my_method(arg)
  puts "hello world"
end
my_method
--------------------

Running the above script generates this error:

--------------------
ArgumentError: wrong number of arguments (0 for 1)

method my_method  in demo.rb at line 4
at top level  in demo.rb at line 4
--------------------

If you can figure out why the above fails, then you should be able to 
figure out why your application is producing that same error. Also 
notice that the error above even tells you which line of code is 
producing that error.

> |Rails.root: /home/resource_portal/website|
>
> Application Trace <http://localhost:3000/upload#> | Framework Trace
> <http://localhost:3000/upload#> | Full Trace
> <http://localhost:3000/upload#>
>
> |app/models/data_file.rb:18:in `commit'
> app/controllers/upload_controller.rb:9:in `create'
> 
rake-0.8.7/ruby/1.9.1/gems/actionpack-3.0.3/lib/action_controller/metal/implicit_render.rb:4:in
> `send_action'
> 
rake-0.8.7/ruby/1.9.1/gems/actionpack-3.0.3/lib/abstract_controller/base.rb:151:in
> `process_action'
> |

I'll leave it as an exercise for you to find the problem from here. It's 
a valuable skill to know how to read error messages, and follow stack 
traces from your programing language. It's something all developers need 
to practice. Don't let errors like this freak you out. If you take the 
time to understand them, they often tell you exactly what's wrong, and 
exactly where to look.

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to