Forum: Ruby Import File problem

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
M Beale (Guest)
on 2007-06-01 08:16
I have a problem I am hoping someone can help me out with.  I am trying
to import a csv file and it goes smoothly while trying to work in my
development environment(radrails) but when deploying it with instant
rails I get the following  message:

 Errno::ENOENT in Sales headerController#import

No such file or directory - Default.pmx.csv

Here is the html code

<form action="/sales_header/import/1?multipart=true" method="post">
   <input type="file" name="importfile" />
   <input name="commit" type="submit" value="Import" />

here is the rails code

  def import['importfile'], 'r') do |row|
          if(@recipe = RecipeHeader.find(:first,:conditions=>['plu = ?
            if(@detail =
SalesDetail.find(:first,:conditions=>['recipe_header_id = ? and
sales_header_id = ?',,params[:id]]))
              @detail.quantity = row[4]
      redirect_to :action => 'edit', :id=>params[:id]

I am totally stumped so any help would be appreciated!!!


Mike Beale
This topic is locked and can not be replied to.