Wednesday, April 10, 2013

Including the Rake task on your script



This line of code is very helpful when you want to include running the rake task  itself  in your script (a task that is being done manually through some third party ide like Putty #for windows to execute a specific  line of code to a bulk of data )

Just include this one-liner code on your rb or spec file:

`ssh ubuntu@your_staging_server.com -t ubuntu@your_staging-server.com "sudo -i -u server_build; cd /your/folder/here; bundle exec rake your_name_of_rake_task_here" `

No comments:

Post a Comment