librelist archives

« back to archive

Errors after upgrading to bleeding edge version of Nesta

Errors after upgrading to bleeding edge version of Nesta

From:
Brian Gonzalez
Date:
2012-05-04 @ 05:14
I was recently receiving the errors here (Caching in nesta-0.9.13 is
broken):

http://librelist.com/browser//nesta/2012/3/5/caching-in-nesta-0-9-13-is-broken/#9626b9b29a3b5ac0fbbce086216bb51b

I upgraded as per Graham's instructions to the bleeding edge version of
Nesta, and now this is my issue when cache is set to true:
https://gist.github.com/2592180

This is running on nginx/passenger. I am willing to offer credentials to my
vps for the nesta team if you're not able to replicate on your own
servers/dev builds.

Thanks,
Brian Gonzalez

Re: [nesta] Errors after upgrading to bleeding edge version of Nesta

From:
Graham Ashton
Date:
2012-05-04 @ 05:36
On 4 May 2012, at 06:14, Brian Gonzalez <me@briangonzalez.org> wrote:

> this is my issue when cache is set to true:
> https://gist.github.com/2592180
> 
> This is running on nginx/passenger. I am willing to offer credentials to
my vps for the nesta team if you're not able to replicate on your own 
servers/dev builds.

I'm on my phone, so haven't dug much, but that looks like the user Nesta 
is running as doesn't have permission to create things inside ./public. 
Maybe.

If you need caching behind a proxy I think 0.9.11 might be your best bet 
for now (though if my diagnosis is correct, it'll give you the same 
error).

Re: [nesta] Errors after upgrading to bleeding edge version of Nesta

From:
Brian Gonzalez
Date:
2012-05-04 @ 05:39
I chmod'd to 777 everything in my nesta root as a test, but to no avail.
I'll try again tomorrow and report back.

Sent from my BriPhone

On May 3, 2012, at 10:36 PM, Graham Ashton <graham@effectif.com> wrote:

On 4 May 2012, at 06:14, Brian Gonzalez <me@briangonzalez.org> wrote:

this is my issue when cache is set to true:
https://gist.github.com/2592180

This is running on nginx/passenger. I am willing to offer credentials to my
vps for the nesta team if you're not able to replicate on your own
servers/dev builds.


I'm on my phone, so haven't dug much, but that looks like the user Nesta is
running as doesn't have permission to create things inside ./public. Maybe.

If you need caching behind a proxy I think 0.9.11 might be your best bet
for now (though if my diagnosis is correct, it'll give you the same error).

Re: [nesta] Errors after upgrading to bleeding edge version of Nesta

From:
Brian Gonzalez
Date:
2012-05-04 @ 15:16
Ok, so I told you last night I'd look into it further, and here's what I
found:

Last night I said I was getting a "No such file or directory" and this was
throwing the error:
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/nesta-0.9.13/lib/nesta/cache.rb:34:in
`cache'


So I edited cache.rb to raise an error so I could see where it was trying
to write to, and here's what I found. It seems as if it should not be
writing to the root of the folder, but to public:
RuntimeError - **************** /srv/www/
stage.briangonzalez.org/releases/20120504045926/index.html:

So I modified line #33 in cache.rb like so, and all seems to work now:
path = File.join( "public", cache_page_path(request.path_info,opts) )

Re: [nesta] Errors after upgrading to bleeding edge version of Nesta

From:
Graham Ashton
Date:
2012-05-08 @ 14:16
On 4 May 2012, at 16:16, Brian Gonzalez wrote:

> Ok, so I told you last night I'd look into it further, and here's what I found:
> 
> Last night I said I was getting a "No such file or directory" and this 
was throwing the error:
> 
/usr/local/rvm/gems/ruby-1.9.2-p318/gems/nesta-0.9.13/lib/nesta/cache.rb:34:in
`cache'
> 
> So I modified line #33 in cache.rb like so, and all seems to work now:
> path = File.join( "public", cache_page_path(request.path_info,opts) )

Thanks for investigating. I would have expected it to be trying to write 
to public in the first place. Maybe something has shifted in Sinatra (or 
something)?

It's high time file based caching was removed from Nesta's core and one of
the caching gems was used instead.

We should probably move this off list. Could you file an issue in the 
issue tracker that collects all the info in one place. I'd like to know:

1. When/where it occurs (e.g. your hosting platform)
2. How I should be able to reproduce it (e.g. "stock Nesta on Passenger")

Cheers,
Graham

Re: [nesta] Errors after upgrading to bleeding edge version of Nesta

From:
Brian Gonzalez
Date:
2012-05-08 @ 14:25
I would be happy to.

I also noticed that when I deploy my nesta site to my VPS (CentOS), and
restart the server, that the Passenger Spawn Server runs under the user
that owns config.ru -- which I assume is the case for all Rackup configs.

Since I am running Passenger with different credentials on my VPS than
locally, I had to go into my server and manually chown config.ru to the
correct credentials then restart the server.

I'll file the issue now, thanks Graham.

On Tue, May 8, 2012 at 7:16 AM, Graham Ashton <graham@effectif.com> wrote:

> On 4 May 2012, at 16:16, Brian Gonzalez wrote:
>
> > Ok, so I told you last night I'd look into it further, and here's what I
> found:
> >
> > Last night I said I was getting a "No such file or directory" and this
> was throwing the error:
> >
> /usr/local/rvm/gems/ruby-1.9.2-p318/gems/nesta-0.9.13/lib/nesta/cache.rb:34:in
> `cache'
> >
> > So I modified line #33 in cache.rb like so, and all seems to work now:
> > path = File.join( "public", cache_page_path(request.path_info,opts) )
>
> Thanks for investigating. I would have expected it to be trying to write
> to public in the first place. Maybe something has shifted in Sinatra (or
> something)?
>
> It's high time file based caching was removed from Nesta's core and one of
> the caching gems was used instead.
>
> We should probably move this off list. Could you file an issue in the
> issue tracker that collects all the info in one place. I'd like to know:
>
> 1. When/where it occurs (e.g. your hosting platform)
> 2. How I should be able to reproduce it (e.g. "stock Nesta on Passenger")
>
> Cheers,
> Graham
>

Re: [nesta] Errors after upgrading to bleeding edge version of Nesta

From:
Graham Ashton
Date:
2012-05-08 @ 15:41
On 8 May 2012, at 15:25, Brian Gonzalez wrote:

> I also noticed that when I deploy my nesta site to my VPS (CentOS), and 
restart the server, that the Passenger Spawn Server runs under the user 
that ownsconfig.ru -- which I assume is the case for all Rackup configs.

It is. See section 7.1 on user switching:

http://www.modrails.com/documentation/Users%20guide%20Nginx.html#user_switching

> Since I am running Passenger with different credentials on my VPS than 
locally, I had to go into my server and manually chown config.ru to the 
correct credentials then restart the server.

If you're deploying with Capistrano (or similar) then it might be worth 
chowning the file once the site has been pushed.

Re: [nesta] Errors after upgrading to bleeding edge version of Nesta

From:
Brian Gonzalez
Date:
2012-05-08 @ 15:49
Thanks for finding that in the modrails docs.


> If you're deploying with Capistrano (or similar) then it might be worth
> chowning the file once the site has been pushed.


That's exactly the solution I came up with a couple of days ago. I also
included that in the Nesta Boilerplate deploy.rb file as a "finalize
update" recipe (https://github.com/briangonzalez/nesta-boilerplate).

Re: [nesta] Errors after upgrading to bleeding edge version of Nesta

From:
Brian Gonzalez
Date:
2012-05-08 @ 15:57
Where would you want the haml config pulled into the nesta repo?
 nesta/templates/themes/app.rb?

On Tue, May 8, 2012 at 8:49 AM, Brian Gonzalez <me@briangonzalez.org> wrote:

> Thanks for finding that in the modrails docs.
>
>
>> If you're deploying with Capistrano (or similar) then it might be worth
>> chowning the file once the site has been pushed.
>
>
> That's exactly the solution I came up with a couple of days ago. I also
> included that in the Nesta Boilerplate deploy.rb file as a "finalize
> update" recipe (https://github.com/briangonzalez/nesta-boilerplate).
>