Luis Lavena wrote:
> On Mon, Apr 12, 2010 at 1:59 AM, Anton Trapp <[email protected]>
> wrote:
>> /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `run'
>> /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/command.rb:212:in
>> `run'
>> /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
>> /usr/bin/mongrel_rails:19:in `load'
>> /usr/bin/mongrel_rails:19
>>
>> Any ideas? alternatives?
>>
>
> If you're mentioning hundred of megabytes it might be possible that
> the Ruby instance is not able to handle the file properly.
>
> Would be great if you can isolate this to a real minimum mongrel
> handler example instead of a Rails application.
>
> I had successfully uploaded big files with mongrel, but honestly never
> tried to upload 200mb or similar because will be suboptimal.
>
> --
> Luis Lavena
> AREA 17
> -
> Perfection in design is achieved not when there is nothing more to add,
> but rather when there is nothing more to take away.
> Antoine de Saint-Exupé²¹
hii,
i am trying to upload some files to filesystem using rails application
when i use small size file everything is perfect but i when goes for
larger files i got error
this is my code
#this model file
class DataFile < ActiveRecord::Base
def self.save(upload)
name = upload['datafile'].original_filename
directory = "//192.168.147.17/Smruti/streams"
# create the file path
path = File.join(directory, name)
# write the file
File.open(path, "wb") { |f| f.write(upload['datafile'].read) }
end
end
#this is my controller
class UploadController < ApplicationController
def index
render :file => 'app\views\upload\uploadfile.rhtml'
end
def uploadFile
post = DataFile.save(params[:upload])
render :text => "File has been uploaded successfully"
end
end
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
Mongrel-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/mongrel-users