Looking for a quick and simple way to upload files?

Hi List,

I’m Jen and this is my first post :stuck_out_tongue:

I won’t bore you with pages of introduction, so here is my

I’m pretty new to web programming and rails. I’ve been looking for a
simple way to upload files to a directory, so I can use GIT to version
them etc. I don’t want anything stored in a database.

I’m trying to adapt code from a tutorial and blog, but looking at the
blog comments no one seemed to be able to get it working. The link to
the blog is:

rails: File upload in rail

The blog contains the link to the tutorial.
The form I have adapted renders OK, but when I try to submit a file for
upload I get the following result:

NoMethodError in UploadController#create

undefined method `original_filename’ for nil:NilClass


|Rails.root: /home/resource_portal/website|

My controller, model and view are attached. I’m using Ruby-1.9.2 and

Any help with this would be great.

Thanks in advance,

On May 15, 4:59pm, Jen [email protected] wrote:

I’m trying to adapt code from a tutorial and blog, but looking at the

There’s a mistake in those instructions - given that the file_field is
called :upload, the save method should be using upload[‘upload’]


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs