I'm writing a cookbook for a Torquebox-based application server, and seeing some odd behavior when using knife for deploys.
When logging into a box as user "ubuntu" and running "sudo chef-client", everything works fine.
When I do the same via "knife ssh", I get GemNotFound errors when calling rake. This leads me to believe it's an environment/path problem, but I can't figure out what would be different. Does knife alter the environment in which a command is executed?
Here is my knife command: knife ssh "role:rails_app_server" interactive -x ubuntu -a ec2.public_hostname -C 1
ec2-23-20-158-139.compute-1.amazonaws.com [Mon, 23 Jul 2012 20:58:17 +0000] INFO: execute[jruby -J-Xmx2048m -J-Xms512m -J-Xmn128m -S bundle install --without development test --deployment] ran successfully
Any thoughts would be much appreciated.