Template not being written or silently failing in passenger-apache cookbook


#1

Hi,

I am attempting to deploy a rails app behind Apache with Passenger.

My recipe code is of the form;

application “myservice” do

path “/var/lib/myservice”

passenger_apache2 do
end

end

The passenger_apache2 provider delegates to a passenger_apache2::mod_rails
recipe that attempts to write two templates to the apache2 mods-available
directory, however they do not get written and no error is thrown.

If however I put the template code directly in my recipe they get written.

The code in passenger_apache2::mod_rails appears to get called, any idea why a
template write would fail?

Regards,
Tommy


#2

Have you run chef-client in debug mode and inspected the output for
these particular statements?
This may provide insight as to what is going on.

On Mon, Mar 25, 2013 at 6:30 AM, tommy.fotak@utas.edu.au wrote:

Hi,

I am attempting to deploy a rails app behind Apache with Passenger.

My recipe code is of the form;

application “myservice” do

path “/var/lib/myservice”

passenger_apache2 do
end

end

The passenger_apache2 provider delegates to a passenger_apache2::mod_rails
recipe that attempts to write two templates to the apache2 mods-available
directory, however they do not get written and no error is thrown.

If however I put the template code directly in my recipe they get written.

The code in passenger_apache2::mod_rails appears to get called, any idea why a
template write would fail?

Regards,
Tommy


#3

Hi Mike,

It ended up being an order of operations/dependency problem. The application_ruby passenger_apache2 provider includes the recipe passenger_apache2::mod_rails. This in turn includes the default passenger_apache2 recipe. The default recipe in this scenario attempts to enable the passenger module before the templates are written by the passenger_apache2::mod_rails recipe.

Tommy

On 25/03/2013, at 7:40 PM, Mike wrote:

Have you run chef-client in debug mode and inspected the output for
these particular statements?
This may provide insight as to what is going on.

On Mon, Mar 25, 2013 at 6:30 AM, tommy.fotak@utas.edu.au wrote:

Hi,

I am attempting to deploy a rails app behind Apache with Passenger.

My recipe code is of the form;

application “myservice” do

path “/var/lib/myservice”

passenger_apache2 do
end

end

The passenger_apache2 provider delegates to a passenger_apache2::mod_rails
recipe that attempts to write two templates to the apache2 mods-available
directory, however they do not get written and no error is thrown.

If however I put the template code directly in my recipe they get written.

The code in passenger_apache2::mod_rails appears to get called, any idea why a
template write would fail?

Regards,
Tommy