[chef] Re: Re: Deploying Rails (4) app with Chef


Chronological Thread 
  • From: Rob Watkin < >
  • To: Chef List < >
  • Subject: [chef] Re: Re: Deploying Rails (4) app with Chef
  • Date: Sat, 14 Dec 2013 17:31:08 +0000

Hi Daniel,

Yes I think you're right. I have now run:
# chef-solo --log_level debug -c /tmp/vagrant-chef-1/solo.rb -j /tmp/vagrant-chef-1/dna.json

and I get:
[2013-12-14T17:19:36+00:00] DEBUG: Ran /usr/local/bundle_wrapper.sh exec rake db:migrate returned 1
[2013-12-14T17:19:36+00:00] WARN: Error on deploying /var/www/releases/2680fd501ac6ab0c76f26da19d45cdee046097f1: /usr/local/bundle_wrapper.sh exec rake db:migrate returned 1, expected 0

But I thought I was running bundle with application_ruby thus:

application "rapto" do
  <snip>
rails do 
bundler true
bundle_command "#{base_dir}/bundle_wrapper.sh"
end

Thanks
Rob


On 14 December 2013 17:01, Daniel Condomitti < " target="_blank"> > wrote:
Run chef-client with -ldebug and you'll get the stack trace from rake. A lot of times this is due to not having run 'bundle' or a missing database (rake db:create:all.)

Sent from my iPhone

> On Dec 14, 2013, at 11:25 AM, Rob Watkin < "> > wrote:
>
> Hi,
>
> I have been working my way through deploying a Rails 4 app with Chef/Vagrant thanks to lots of help from this list.  :-)
>
> Now Chef is saying:
>
> 2013-12-14T15:24:03+00:00] INFO: deploy_revision[rapto] migrating apache with environment RAILS_ENV='production'
> [2013-12-14T15:24:04+00:00] WARN: Error on deploying /var/www/releases/2680fd501ac6ab0c76f26da19d45cdee046097f1: /usr/local/bundle_wrapper.sh exec rake db:migrate returned 1, expected 0
> [2013-12-14T15:24:04+00:00] INFO: Removing failed deploy /var/www/releases/2680fd501ac6ab0c76f26da19d45cdee046097f1
>
> I can't run rake to diagnose this because Chef is removing my Rails app folder. How can I stop Chef from Removing the failed deploy?
>
> Thanks
> Rob




Archive powered by MHonArc 2.6.16.

§