Good to hear. Fork, fix, and submit a pull request!
Sent from mobile
Thanks for the insight and examples, Denis & Igor. I think I was being thrown off by the documentation errors and all the deprecated code in the application cookbook. It's starting to come together now.WesOn Jul 21, 2012, at 12:20 PM, Denis Haskin wrote:Correct, you need the ruby do block.I have a cookbook for my application, which hasdepends "application_ruby"in its metadata.rb, and then in its default recipe, has this (as an example):application "zmx_app" dopath "/srv/zmx"owner 'nobody'group 'nogroup'repository ' :zmxmusic/zmx2.git'deploy_key "-----BEGIN RSA PRIVATE KEY----- ...etc... -----END RSA PRIVATE KEY-----\n" # note embedded newlinesif node.chef_environment=='production'revision '2.26'action :deployelserevision 'master'action :force_deployenddb = "zmx_#{node.chef_environment}"rails dogems ['bundler']precompile_assets truedatabase doreconnect trueencoding 'utf8'username '...'adapter 'mysql2'password '...'database dbenddatabase_master_role "zmx_database_master"endpassenger_apache2 doendendThere might well be better ways to do it; I migrated up from the old cookbook. My apache/passenger config is really done in other recipes; one of these days I'll take care of that and probably migrate to unicorn, nginx, etc.Don't know what you're using for database. I had to wrestle mightily with the mysql (and database?) cookbooks to get a working set of cookbooks+recipes that would come up from scratch on AWS... I'm not even convinced I've actually got that, yet, but needed to move on and get stuff done.
--Denis Haskin
On Sat, Jul 21, 2012 at 1:09 PM, Wes Morgan < " target="_blank"> > wrote:I'm trying to deploy a Rails app using the new application cookbook. According to the README, I'm supposed to declare a dependency on the application_rails cookbook in the metadata.rb, but that doesn't seem to exist. Earlier in the README, application_ruby is mentioned, so I switched it to that. Do we need a documentation fix there?
Anyway, I can't quite figure out how the rails-y portion of the cookbook is supposed to be invoked. Just declaring a "depends" line in metadata.rb doesn't actually run anything, does it?
I see in the examples that there is a rails do ... end block in the application's block. Is that what triggers it?
Does anyone have a working example of deploying a Rails app w/ the new application cookbook?
Wes
Archive powered by MHonArc 2.6.16.