librelist archives

« back to archive

/public/ folder invisible on Heroku in 0.9.7?

/public/ folder invisible on Heroku in 0.9.7?

From:
Nathanael D. Jones
Date:
2011-08-21 @ 16:46
I'm out of ideas. I just upgraded http://imageresizing.net/ to 0.9.7, fixed
Config.ru, ran 'builder upgrade', committed everything (including the
gemfile and lockfile), and pushed to Heroku.

Everything worked except the /public/ folder. Nothing from that directory
could be found, 404s instead. I.e, no scripts, stylesheets, or images.

I've reviewed every character that has changed between the last working push
and the new one, even in the Nesta CMS code itself.

I noticed Rack went from 1.2 to 1.3.2, but other than that I couldn't find
any seemingly related code changes. After a few hours with the site down, I
had to do a rollback.

Any ideas why this is happening, or how I can proceed to debug it? I can't
reproduce the problem with shotgun locally, despite identical files.

Re: [nesta] /public/ folder invisible on Heroku in 0.9.7?

From:
Graham Ashton
Date:
2011-08-22 @ 04:58
On 21 Aug 2011, at 17:46, "Nathanael D. Jones" <nathanael.jones@gmail.com> wrote:

> I'm out of ideas. I just upgraded http://imageresizing.net/ to 0.9.7, 
fixed Config.ru, ran 'builder upgrade', committed everything (including 
the gemfile and lockfile), and pushed to Heroku. 
> 
> Everything worked except the /public/ folder. Nothing from that 
directory could be found, 404s instead. I.e, no scripts, stylesheets, or 
images.

I can confirm I'm seeing the same thing, but only on sites running on 
Heroku. Sites running on a server with passenger aren't affected by it.

Thanks for reporting it. I'll investigate and see if I can work out a way 
to debug it.

> I've reviewed every character that has changed between the last working 
push and the new one, even in the Nesta CMS code itself.

From what I remember, nothing in Nesta itself is likely to have caused it 
— your rack suggestion is a good one.

Everybody else — if you're deploying to heroku hold off with 0.9.7; 
hopefully I'll get to the bottom of this soon and get a fix out.

Cheers,
Graham

Re: [nesta] /public/ folder invisible on Heroku in 0.9.7?

From:
Graham Ashton
Date:
2011-08-22 @ 07:27
On 22 Aug 2011, at 05:58, Graham Ashton wrote:

>> I've reviewed every character that has changed between the last working
push and the new one, even in the Nesta CMS code itself.
> 
> From what I remember, nothing in Nesta itself is likely to have caused 
it — your rack suggestion is a good one.
> 
> Everybody else — if you're deploying to heroku hold off with 0.9.7; 
hopefully I'll get to the bottom of this soon and get a fix out.

I created a ticket here:

https://github.com/gma/nesta/issues/59

I've worked out what's up, and it's a Nesta bug. Sinatra relies on 
Sinatra::Application.root to be set; in 0.9.6 I moved the root setting 
from Nesta::App (which is a Sinatra::Application) to Nesta::Env and forgot
to later assign anything to Nesta::App.root.

You can work around it for the moment with a change to your config.ru 
file. Note line 10:

https://github.com/gma/nestacms.com/blob/master/config.ru

I'm aiming for a cleaner fix than that for 0.9.8.