Here’s an example of how you can pass variables to your capistrano actions via the
So, the above action could be called as follows:
cap log cap log -s lines=1000 cap log -s rails_env=test
For reference, you pass values to Rake tasks via environment variables:
rake db:migrate RAILS_ENV=test
Inside the db:migrate task, you’d retrieve the value ‘test’ via
And further more, this then compares to how you'd normally pass option values into normal command-line apps:
tail -n 1000 log/production.log
Who said the unix command line wasn't easy peasy. Bah.
- Magic Multi-Connections: A “facility in Rails to talk to more than one database at a time” At this point in time thereâ€™s no facility in Rails...