Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Executing ruby script remotely

 
Amrutha sanjeevraj
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to execute ruby script remotely or accessing ruby script from one machine and executing it on another machine ?
 
Sumit Bisht
Ranch Hand
Posts: 331
Python Ruby Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It takes the same route as executing any script over a remote system over bash. Just do a curl to get the script ruby <(cur -s url)
 
David Harrison
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

here is an example, using ssh and pgp-key-pairs for authentication, on Unix
In this example, it executes a rake task

ssh [user_name]@[host] "cd [ruby_rails_directory]; RAILS_ENV=[environment] rake [rake_task]"
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic