Forum: Ruby on Rails Cant serve video via rails

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.
97757f6106abd602874d2c26f7901bb2?d=identicon&s=25 Oliver Fox (olifox)
on 2008-11-05 18:38
Hi all,
I have an m4v file which I'm trying to view on my iPhone via a rails
If i place the file in my apache root or in /public and hit the url, it
plays back fine, but no matter what I try with rails, the iPhone will
try to download the file and receive an error.

I have set up an apache->mongrel balanced cluster, with the rails
/public directory being handled by apache
config here:

I've tried adding a mime-type to config/initializers/mime_types.rb like
Mime::Type.register "video/m4v", :m4v
but that made no difference.

Any ideas where i'm going wrong? Shouldn't the apache server be serving
the static content given my config?

according to this post Directory directives are recursive, so should
apply to files in RAILS_ROOT/public/files/*

the files i'm linking to are like: http://localhost/files/video.m4v

thanks for reading
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2008-11-05 22:47
(Received via mailing list)
On 5 Nov 2008, at 17:38, Oliver Fox wrote:

> /public directory being handled by apache
> config here:
shouldn't your document root be /home/devel/Projects/demosite/branches/
demosite/public ?

that's the way it normally is with an apache deployment (if not the /
some_video.m4v would indeed get passed to rails)

This topic is locked and can not be replied to.