On Mon, Jan 10, 2011 at 12:27:13PM -0800, Ben Lavender wrote:
> I'm loving playing around with the DSL.  There are some problems (ie
> 5237), but now that it's Ruby, I can fix them! woo!
> 
> However, I'm stumped on this one, which may or may not be related to
> the DSL.  When trying to have a resource have a simple dependency on
> two things at once, it simply fails, and I'm stumped as to why.  The
> error message is:
> 
> Parameter require failed: No title provided and "[ Exec[git-/usr/local/
> resque-runner], Rvm_install[1.9.2-p136]]" is not a valid resource
> reference
> 
> My definition looks like this:
> 
> define :bundle_install, :rvm do
>   rvm_exec "bundle...@name}",
>            :command => "bundle install --without production",
>            :ruby => @rvm,
>            :path => "/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin",
> 
>            # this alone works:
>            #:require => "rvm_install...@rvm}]",
> 
>            # this alone also works:
>            #:require => "exec[git...@name}]",
> 
>           # this fails:
>           :require => "[ exec[git...@name}], rvm_install...@rvm}]]",
> 
>            :cwd => @name,
>            :creates => "#...@name}/.bundle/config"
> end
> 
> Am I missing something, or should I open a ticket?
> 
Never tried the dsl but I guess require wants an array, not a string
that looks like an array. So I think
:require => [ "exec[git...@name}]", "rvm_install...@rvm}]"]
will work.

-Stefan

Attachment: pgpIhO1DB73a9.pgp
Description: PGP signature

Reply via email to