Templates and "relative_path_from" error


#1

I can’t seem to finding anything relative on google about this.

For recipes which use templates of both my own recipes and one which came from
the cookbooks on github, it consistently bombs with an error similar to this
when processing templates:

ERROR: template[/etc/ssmtp/ssmtp.conf]
(/usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/recipe.rb line 191) had an
error:
different prefix: “/” and “.”

/usr/lib/ruby/1.8/pathname.rb:709:in `relative_path_from’: different prefix:
"/" and “.” (ArgumentError)

This example was one that I created, but also happens with the apache2 and
nginx recipes from github cookbooks.

Any ideas?

Running this on a clean ec2 ubuntu 9.04 instance:
http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1952&categoryID=101

Thanks, Doug


#2

On 23/08/2009, at 9:29 AM, doug.bryant@milemeter.com wrote:

I can’t seem to finding anything relative on google about this.

For recipes which use templates of both my own recipes and one which
came from
the cookbooks on github, it consistently bombs with an error similar
to this
when processing templates:

ERROR: template[/etc/ssmtp/ssmtp.conf]
(/usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/recipe.rb line 191)
had an
error:
different prefix: “/” and “.”

/usr/lib/ruby/1.8/pathname.rb:709:in `relative_path_from’: different
prefix:
"/" and “.” (ArgumentError)

This is caused by two settings usually in solo.rb or client.rb with
File.join("…") in it, wrap them in File.expand_path.

This example was one that I created, but also happens with the
apache2 and
nginx recipes from github cookbooks.

Any ideas?

Running this on a clean ec2 ubuntu 9.04 instance:
http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1952&categoryID=101

Thanks, Doug


AJ Christensen, Software Engineer
Opscode, Inc.
E: aj@opscode.com


#3

This might be a reasonable thing for us to force… Prolly worth
opening a ticket to do so.

Sent from my iPhone

On Aug 22, 2009, at 2:40 PM, Arjuna Christensen aj@opscode.com wrote:

On 23/08/2009, at 9:29 AM, doug.bryant@milemeter.com wrote:

I can’t seem to finding anything relative on google about this.

For recipes which use templates of both my own recipes and one
which came from
the cookbooks on github, it consistently bombs with an error
similar to this
when processing templates:

ERROR: template[/etc/ssmtp/ssmtp.conf]
(/usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/recipe.rb line
191) had an
error:
different prefix: “/” and “.”

/usr/lib/ruby/1.8/pathname.rb:709:in `relative_path_from’:
different prefix:
"/" and “.” (ArgumentError)

This is caused by two settings usually in solo.rb or client.rb with
File.join("…") in it, wrap them in File.expand_path.

This example was one that I created, but also happens with the
apache2 and
nginx recipes from github cookbooks.

Any ideas?

Running this on a clean ec2 ubuntu 9.04 instance:
http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1952&categoryID=101

Thanks, Doug


AJ Christensen, Software Engineer
Opscode, Inc.
E: aj@opscode.com


#4

Thank you very much. It works like a champ now.

Doug

On Aug 22, 2009, at 4:40 PM, Arjuna Christensen wrote:

On 23/08/2009, at 9:29 AM, doug.bryant@milemeter.com wrote:

I can’t seem to finding anything relative on google about this.

For recipes which use templates of both my own recipes and one
which came from
the cookbooks on github, it consistently bombs with an error
similar to this
when processing templates:

ERROR: template[/etc/ssmtp/ssmtp.conf]
(/usr/lib/ruby/gems/1.8/gems/chef-0.7.8/lib/chef/recipe.rb line
191) had an
error:
different prefix: “/” and “.”

/usr/lib/ruby/1.8/pathname.rb:709:in `relative_path_from’:
different prefix:
"/" and “.” (ArgumentError)

This is caused by two settings usually in solo.rb or client.rb with
File.join("…") in it, wrap them in File.expand_path.

This example was one that I created, but also happens with the
apache2 and
nginx recipes from github cookbooks.

Any ideas?

Running this on a clean ec2 ubuntu 9.04 instance:
http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1952&categoryID=101

Thanks, Doug


AJ Christensen, Software Engineer
Opscode, Inc.
E: aj@opscode.com

===
Doug Bryant
doug.bryant@milemeter.com