hi yong
i got the same proble and solved it ,

you can use in form tag uploadfile instead of uploadFile

and in render file : use #"{root_url}/app/view/--path"

hope you will solve it ..
thanks

rahul

On Mar 28, 10:32 pm, Yong Gu <zerogy...@gmail.com> wrote:
> Did you add uploadFile to route.rb?
>
> And i think you'd better follow rails' convention, instead of writing code
> as like using some other frameworks
>
> On Mon, Mar 29, 2010 at 2:26 PM, Tony Augustine <li...@ruby-forum.com>wrote:
>
>
>
> > Yong Gu wrote:
> > > I think use *render :file => 'uploadfile.html.erb'*, as rails would look
> > > for
> > > the template in your view directory, which is "app/views",
>
> > > and if you use render :file => 'controller/uploadfile.html.erb', it will
> > > look for the template in "app/views/controller/uploadfile.html.erb", or
> > > rails always
>
> > > assume you have already put your template in the controller's according
> > > view
> > > folder
>
> > wheen i  did that i am  getting the error like this
>
> > hiiiiiiiiiii3
> >  SQL (0.5ms)   SET client_min_messages TO 'panic'
> >  SQL (0.5ms)   SET client_min_messages TO 'notice'
> >  SQL (0.6ms)   SET client_encoding TO 'unicode'
>
> > Processing UploadController#uploadFile (for 127.0.0.1 at 2010-03-29
> > 11:47:28) [POST]
> >  Parameters: {"commit"=>"Upload",
> > "authenticity_token"=>"g1vUQZ7QAh7FjfusjbJuh7EBO4UVVFInaYsxzCMK91I=",
> > "date_file"=>{"upload"=>#<File:/tmp/RackMultipart.3648.0>}}
>
> > NoMethodError (You have a nil object when you didn't expect it!
> > You might have expected an instance of ActiveRecord::Base.
> > The error occurred while evaluating nil.[]):
> > --
> > Posted viahttp://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 rubyonrails-t...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > rubyonrails-talk+unsubscr...@googlegroups.com<rubyonrails-talk%2bunsubscrib...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/rubyonrails-talk?hl=en.- Hide quoted text -
>
> - Show quoted text -

-- 
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 rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to