Displaying 20 results from an estimated 10000 matches similar to: "send_file on win32"
2006 Nov 30
3
Strange send_file problem
Or perhaps I am stumbling in newbie fashion (tho I have active_merchant
and a store site basically up and running in development mode - still I
don''t feel I always understand what is going on.)
So, when I have
send_file(filename, :type => ''application/x-zip'')
redirect :action => index
the send_file seems to hang, rather than complete. I''m deducing
2005 Dec 02
0
send_file method on windows and webrick
I am developing in a windows xp environment running WEBrick and MySQL,
RoR 0.13.1. I am trying to retrieve the file that I uploaded via Rails
using the send_file() method. Instead of returning the file, the file''s
contents are being printed out to the WEBrick console, the browser hangs
for a while, and then an empty file is returned from the download dialog
box (Firefox 1.0.7/IE
2005 Dec 13
3
send_file doesn't work with Apache?...
Hi,
I''ve been using send_file in my Rails application with
WEBrick happily to send files of various sizes and
kinds.
The same code fails to send anything but a 500 error
when run under Apache, and a log file message
"warning: syswrite for buffered IO".
Looking back through the mailing list archives I see that
there have been send_file bugs in the past. Can some
knowledgeable
2006 May 14
1
send_file, RRDtool, require or session problem
Hi all,
I am new to RoR and ruby, but am a very experience PHP developer. Let
me give an overview of the problem.
I have a model Latency, which contains username, graph_name so the
logged in user can see his/her latency graphs.
In my ViewController I have a fuction view_latency which pulls the
correct latency object and runs latency.overview. latency.overview
creates a .png file in /tmp, and
2006 Dec 14
1
Does send_file act differently with Mongrel than with Webrick?
Mongrel 0.3.13.3
Windows XP
Rails 1.1.6
I have a rails app that serves up mp3 files via the send_file command. We create a playlist (M3U) with URLs to the mp3s. These play just fine using Windows Media Player. However using WinAmp we get an error "error syncing to stream" when it tries to request the mp3.
After playing around I found that if I am running Rails under Webrick WinAmp
2006 Dec 14
1
Does send_file act differently with Mongrel than withWebrick?
I tried the mime thing but it did not help. I didn''t think it was that because I can get the mp3 served OK hitting the URL in a browser.
I just noticed that I am getting an error in Mongrel when WinAmp make the request for the mp3 file:
BAD CLIENT (127.0.0.1): Invalid HTTP format, parsing fails.
I don''t think Mongrel has a problem with the URL itself because if a browser
2005 Dec 20
0
2005 a send_file odyssey (or Rails and Apache don''t always play well)...
Hi,
I''m developing a Rails application that (amongst other things)
lets users download media files. These files range in size
from a few kilobytes up to several gigabytes.
All this development is taking place with Rails 1.0 on a
Solaris host with Ruby 1.8.2 and Rails mode set to
"development".
I''m using the Rails send_file method to send each file with
these
2006 Aug 14
0
SCGI on Apache 2 send_file Error
Hi,
My program send s PDF file to the browser using send_file. Everything
works fine in Webrick but when I switch to SCGI/Apache, the PDF file just
does not get streamed to the browser. I checked the error logs and this is
what I got from server.log
Mon Aug 14 12:51:24 2006] [error] [client 127.0.0.1] malformed header from
script. Bad header=%PDF-1.3: 26, referer:
2012 May 31
2
send_data/send_file does not open a save as dialog box
Hello,
We are using JRuby 1.5.1/ruby 1.8.7/Rails 2.3.8 with a GWT front end.
I''m having an issue when attempting to send a server side .csv file to
the user using rails send_file.
my code is:
send_file(path_to_file, type=>''text/csv'')
While this is returning fine with an http status of 200, the client
side save as dialog is never opening for the user to receive
2007 Feb 22
0
error with send_file.. please help me...
Ben wrote:
> API is your friend.
> http://api.rubyonrails.org/classes/ActionController/Streaming.html#M000091
> send_file
I put this code block in files_controller.rb
def send_file(path, options = {}) #:doc:
raise MissingFile, "Cannot read file #{path}" unless
File.file?(path) and File.readable?(path)
options[:length] ||= File.size(path)
2006 May 14
3
send_file and locking files after download?
Hello,
I''m working on a download service which grants users a one-time-download
access to files. The idea is to write an entry to a database table after
a successful download that "locks" the download link for the user.
After doing some quick tests with send_file I noticed that send_file
does not block until the user has downloaded the full file, but proceeds
with the
2006 Aug 08
2
send_file problem
I''m attempting to use send_file to send an image file from
public/images. The file is world readable.
I keep getting the following error:
A ActionController::MissingFile occurred in account#current_logo:
Cannot read file public/images/logo.png
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/streaming.rb:55:in
`send_file''
I''ve tried supplying
2006 Jul 22
0
form_remote_tag and send_file
All,
I have an existing form that calls an action which in turn creates a PDF
and sends it to the browser using send_file.
I want to change this form to use form_remote_tag so that I can set a
progress bar and once the PDF is finished, the progress bar hides and
the PDF opens.
The send_file data is being sent to the browser, but not displayed
anywhere. When I use a regular form post, it
2006 Apr 03
0
Making output_compression work with send_file
While working with the newly fixed output compression plugin, one of
the devs in my team discovered that it breaks with send_file(). So if
you are using send_file() in your application you must get the fixed
file I''ve put at: http://devblog.famundo.com/output_compression.rb.
The change is actually in checking for the Content-Disposition header
added by send_file(). See the full writeup
2007 Aug 27
1
Send_file() method for downloading any file
HI,
I need to know how to download any file using send_file() method.The
code I have shown below is for a specific file........how ever I need it
for any file.
THE CODE
........
def download_files
send_file(''D:/hr/Handbook.doc'',
:filename => params[:filename] ,
:type => ''application/octet-stream'',
2007 Aug 24
1
How to download any file using send_file() method
HI,
I am directory listing and in that listing I have certain files and sub
directories, now when I click on the files it should download that
particular file but I am not able to accomplish it, and I have got to
use send_file() method.
In the send file Code shown below I have made use of the address of one
of the files directly so when I click the link of any file it downloads
it.
THE CODE
2006 Jul 16
0
send_file with stream enabled
Has anyone managed to use send_file with :stream => true?
I''m currently still developing using Rails 1.1.2 on windows xp so might
be OS problem. But google results show this also happen on linux hosts.
I think using send_file with :stream => false is pointless. Since
send_data does exactly the same thing. Or am I mistaken?
Thanks.
--
Posted via http://www.ruby-forum.com/.
2006 Apr 13
0
Making @headers[''Refresh''] and send_file work together?
I''ve got a Rails 1.1 app where people can click a link to download a
custom-generated file. The link to "Download Zip" goes to /
controller/get_zip. That action looks like this:
def get_zip
@cart = find_cart
ids = Array.new
@cart.songs.each do |song|
ids.push song.id
end
args = ids.join(" ")
zipfile =
2005 Nov 11
0
Send_file and Firefox
Hello,
I am trying to use send_file in my controller to serve up specific
content: (.doc, ..xls)
Seems to work fine in IE, but in FF (1.0.7, on Windows) after the file
d/ls and the app (MS Word, MSExcel) opens up with the content, a blank
window comes to the front (gets focus).
Any idea how to prevent this?
Do I need a redirect_to after the send_file in my controller''s
download_file
2005 Oct 14
1
Detecting Webrick // determining application "root" directory
Is there a way to detect Webrick at runtime? I''ve
noticed a couple of differences between my dev
environment (Webrick) and the production environment
(Apache 2/FastCGI):
* stream must be false in send_file with webrick
* pwd is different
- Webrick: It''s where you run ruby
script/server from
- Apache: It''s the public directory
... unless someone