I should point out that I solved this via a different method (though
still have no idea why the above doesn't work, so would love someone
to enlighten me).

I used rack-rewrite in a .gems file and went from there :

I've detailed what I did on my blog :

http://blog.wakatara.com/2010/09/15/serving-up-static-sites-on-heroku-redux/

It definitely works.


On Sep 12, 8:34 pm, Daryl <[email protected]> wrote:
> A strange one. I have a static served site I threw up on heroku with a
> simple config.ru file that was working fine until someone pointed out
> it was down yesteday.
>
> The app is only not serving the index.html page if you navigate to the
> domain root ie.www.example.com. It works if you usewww.example.com/index.html
> for example.
>
> config.ru
> use Rack::Static, :urls => ["/css", "/images", "/index.html", "/
> contact.html", "/home.html", "/password.html"], :root => "public"
> run lambda { |env| [200, { 'Content-Type' => 'text/html', 'Cache-
> Control' => 'public, max-age=86400' }, File.open('public/index.html',
> File::RDONLY)] }
>
> Runs fine under thin 1.2.7 on my dev laptop.
>
> When I heroku logs I get :
> !! Unexpected error while processing request: uninitialized constant
> Rack::File::RDONLY
>
> Removing that parameter just creates other Rack::File errors which
> makes me assume something has change don heroku since this worked fine
> in the past (only thing I can think of is the fact I have multiple
> domains iw. example,com,www.example.com, 
> example_second.com,www.example_second.compointing at it).
>
> directory tree is :
> .
> |-- config.ru
> `-- public
>    |-- contact.html
>    |-- css
>    |   |-- microsite_v1.css
>    |   `-- microsite_v2.css
>    |-- home.html
>    |-- images
>    |   |-- animation70.gif
>    |   |-- blank.gif
>    |   |-- logo.gif
>    |   `-- square.gif
>    |-- index.html
>    `-- password.html
>
> Anyone able to help me here ? There are no bundled gems on this in
> a ,gem or Gemfile file as the thing worked previousl without them so
> assuming a change in heroku has affected this somewhat... or I'm just
> being dense, but I've had someone else look at this and they can't
> puzzle it out either.
>
> thanks for any assistance. I've sure it's something very small.
> ciao !
> Daryl.

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.

Reply via email to