Displaying 20 results from an estimated 10000 matches similar to: "ActionController#send_file"
2006 Jan 19
10
Where to place uploaded files for later download?
Hi there,
I am working in a RoR application which allows certain users
to upload files. Currently I store these files
in a directory called "files". This directory is located in
the RoR application directory:
rails/rails_application/files
So users don''t have access to them.
Now I want users to be able to download some of these files
(they will search based on some
2006 Jan 14
4
Rails URLs always try to open non-existent files
The lighttpd config file is set up like this...
Rails url: //host/controller/method/id
Lighttpd tries to open the file ''controller/method/id'' from the document root.
Of course this doesn''t work and generates an error 404
This gets caught with: server.error-handler-404 = "/dispatch.fcgi"
Which turns the request into "/dispatch.fcgi"
That gets caught
2006 Jan 15
7
Dreaded Internal 500 Error on DreamHost.
Hey guys,
I often get this problem the first time I try to deploy a rails app
on dreamhost and I''m not sure what the cause is. Basically, I have
an app that''s running fine on my local machine. I''ve uploaded the
app, configured and migrated to the latest version of the db, and set
all of the necessary directories to 755. But when I run dispatch.rb
in ssh or
2006 Dec 21
6
Rails'' send_file, Mongrel, and *gasp* memory
I''ve had a right fun few days at work trying to figure out why our Rails
app (which isn''t under very heavy load) kept eating memory and bringing
our server to our knees. Eventually I traced it to send_file (which was
in a way a relief as it wasn''t down to my coding ;) -- every time a user
started downloading, the memory consumed by the app would jump, and
2006 Jan 13
4
FastCGI processes sometimes ''hang''
I am running a RoR application on Apache 1.3/RedHat 7.3/MySQL 3.1.23
(Old versions I know, but upgrading to latest versions are not practical
for a number of reasons). There are 5 RoR FastCGI processes configured
using FastCgiServer.
What I am finding is that, after a while, some of the FastCGI processes
seem to ''hang''. They no longer process requests, and the only way to
2004 Oct 16
1
0.184 -- gcc: warning: `-x c' after last input file has no effect
What do I need to do to fix this?
[jonsmirl@smirl klibc-0.184]$ make
make[1]: Entering directory `/home/dri/klibc-0.184/klibc'
gcc -Wp,-MT,syscalls.nrs,-MD,./.syscalls.nrs.d -mregparm=3 -DREGPARM=3
-march=i386 -Os -g -falign-functions=0 -falign-jumps=0 -falign-loops=0
-nostdinc -iwithprefix include -D__KLIBC__ -DBITSIZE=32
-I../include/arch/i386 -I../include/bits32 -I../include
2006 Jan 31
2
New free IBM DB2 with few restrictions
This will give you something to run on when Oracle refuses to renew
the MySQL InnoDB license next year.....
Linux and Windows versions
You can run DB2 Express-C on up to 2 dual-core CPU servers, with up to
4 GB of memory, any storage system setup and with no restrictions on
database size or any other artificial restrictions.
Business partners may choose to register for free redistribution of
2004 Feb 07
1
double define of __BIT_TYPES_DEFINED__
/klibc/klibc/include/bits32/bitsize/stdint.h:8: error: redefinition of `int8_t'
/klibc/linux/include/linux/types.h:109: error: `int8_t' previously declared here
The copy in stdint.h is not protected by:
#ifndef __BIT_TYPES_DEFINED__
#define __BIT_TYPES_DEFINED__
#endif /* !(__BIT_TYPES_DEFINED__) */
=====
Jon Smirl
jonsmirl@yahoo.com
__________________________________
Do you Yahoo!?
2006 Jan 17
2
file_column plugin and instance variables
To make file_column work I have to copy my local variable back to an
instance variables like this:
<% for product in @products
@product = product %>
<div class="catalogentry">
<%= image_tag url_for_file_column(''product'', ''image_url'') %></p>
This is needed because file_column specifically looks for the instance
2006 Feb 23
5
Running apps in subdirectories using lighty/scgi
Hi,
So thanks to Zed I was able to get lighty/scgi and a Rails app running.
I know this might not be the best place to post this, but I guessed
there may be several others with similar experiences here.
So, the following step is to have several apps each in its on
subdirectory. I tried the following to no avail:
$HTTP["url"] =~ "^/tango/" {
server.document-root =
2006 Jan 13
2
FastCGI problems
I''m having a lot of problems with my Typo install. My fastcgi fails horribly
after a reboot:
[13/Jan/2006:16:55:28 :: 19796] Dispatcher failed to catch: (Interrupt)
/usr/lib/ruby/site_ruby/1.8/fcgi.rb:597:in `each''
/usr/lib/ruby/site_ruby/1.8/fcgi.rb:597:in `each_cgi''
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:52:in
`process!''
2006 Jan 23
9
Web Hosting Options?
Can someone recommend a good web host for ROR?
--
Posted via http://www.ruby-forum.com/.
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 Jul 19
11
Hosting a Ruby App From Home - Approach?
Hi,
Any advice/comments on the potential for hosting some personal Ruby
applications from home? (i.e. for learning, sharing with friends etc)
Would the basic concept be:
* Need to buy a static IP address from you ISP
* By a domain name and point it to the static IP address
* Run Apache as the front end web server
- Q: What basic lockdown/security steps should one take?
* Perform a PORT
2007 Nov 08
5
Rails byte-range request support
Hi,
I''m trying to serve the iPhone a video file from my controller using
send_file. However, it appears as thought the iPhone requires byte-
range request support and rails doesn''t seem to support this.
If I give the iPhone a url that points to an actual file (i.e. it''s
served by my webserver nginx, instead of rails) it downloads and plays
it fine.
Here is the proof
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 Jan 14
12
Dedicated Host Recommendations?
I currently have a dedicated server at ev1servers, but
it''s getting rather antiquated (Redhat 9) and am
looking to upgrade. I''m thinking about serverbeach.com
- one of their CentOS servers. Anybody have any
recommendations for dedicated servers on which to run
Rails? Hopefully less than $200/month.
Thanks!
CSN
__________________________________________________
Do You Yahoo!?
2007 Dec 12
10
sendfile and mongrel
forgive me if this has been resolved already...
I have an app that is using sendfile to return large files to customers.
We can''t use regular Apache to handle this static content since the
files are what the customers are paying for - so it wouldn''t be cool for
anyone else to get access to them.
The issue is that the mongrel mem footprint gets bloated when the files
are
2006 May 31
4
Sending files through send_file or by httpd?
If I were to serve files, would send_file via rails be slow?
I think they will be 200mb avi files.
Would it be better to send them via /public ?
But I would like to track the clicks on each file - which makes me think
that I can''t serve them out on /public as those clicks will not go
through my application.
Any help or suggestions?
--
Posted via http://www.ruby-forum.com/.
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