Displaying 20 results from an estimated 200 matches similar to: "send_file problem"
2006 Jul 05
2
Protecting Static content
Hi,
I want to build a rails backed site which, in addition to some dynamic
content, also comprises a number of static content files. There are
some static html pages, some powerpoint presentations, and some PDF
documents.
I want to make sure that the user is logged in before they can access
the protected content. I''ve gone through the ''Agile development with
2011 Nov 28
6
xenoprof patch for oprofile-0.9.7
I am rebasing Fedora rawhide oprofile package to oprofile-0.9.7. The xenoprof patches on http://xenoprof.sourceforge.net/#download look a bit dated. The newest version is for oprofile-0.9.5.
I massaged the patch oprofile-0.9.5-xen.patch to apply to oprofile-.0.9.7. Attached is that updated patch. Does this look reasonable? Is there a desire to get this into upstream oprofile? Or should the
2007 Dec 17
2
Error in send_file
I''m trying to add a link to download a zip file. I created a
controller method that makes the call to send_file:
def getzip
send_file ''file.zip''
end
When I navigate to this link I get a MissingFile exception. The file
definitely exists (and U triple-checked paths and spelling) and the
permissions are 644. I tried moving it to the /public folder and
updating the
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)
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 Dec 21
1
need some guidance with a test
This is part of a rails project. The following method is part of the Ams
class (a rails model). I''m a bit unsure of the rspec/bdd way of testing this
method.
def persist_as_domains
@current_domains.each do |d|
dom = Domain.new
dom.domain = d
dom.source_id = 1
dom.at = Time.now
dom.save
end
end
The following is what came out when I tried to write my test. Notice
2008 Mar 06
4
dot matrix POS parallel printer problems
I have a application that writes to the LPT1 directly,
in wine there is a lot of missing characters in the printout,
in the console printing to /dev/lp0 works ok.
I'm using puppy linux.
Any help welcome.
Thank you
2009 Aug 20
3
[PATCH ovirt-node-image] fixes for edit-livecd
Patch set fixes issues with image size increase when using edit-livecd
Also address issue with ext4 root fs
2017 Sep 06
4
post_processor in rmarkdown not working
Dear all,
I'm trying to write a post_processor() for a custom rmarkdown format. The
goal of the post_processor() is to modify the latex file before it is
compiled. For some reason the post_processor() is not run. The
post_processor() does work when I run it manually on the tex file.
Any suggestions on what I'm doing wrong? Below is the relevant snippet of
the code. The full code is
2014 Dec 15
2
(no subject)
Hi,
I noticed the diff wasn't showing the "-" at the start of a deleted file
and the details of the second file when attributes are different.
This change should fix them.
thanks.
2017 Sep 07
3
post_processor in rmarkdown not working
Dear Duncan,
Thanks for chiming in. Could you explain how you set debug() on
post_processor()? I've tried adding debug(post_processor) to rsos_article()
or adding debug(post_processor) when after post_processor was defined in
the debugger. Neither work for me.
All supporting files are available within the package. The code below
should be reproducible on your machine.
2017 Sep 07
2
post_processor in rmarkdown not working
On 07/09/2017 2:04 PM, Duncan Murdoch wrote:
> On 07/09/2017 10:11 AM, Thierry Onkelinx wrote:
>> Dear Duncan,
>>
>> Thanks for chiming in. Could you explain how you set debug() on
>> post_processor()? I've tried adding debug(post_processor) to
>> rsos_article() or adding debug(post_processor) when after post_processor
>> was defined in the debugger.
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 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:
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 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 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 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
2006 Apr 05
1
send_file VS. send_data (performance)
Does anybody know if there is a big performance/time cost difference
between these two methods of serving a file:
------------------------------- #1
-----------------------------------------
send_file "test.png", :type => ''image/png'', :disposition => ''inline''
-------------------------------
#2------------------------------------------
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 =