Tuesday, 15 October 2013

Use rvm in cron

  1. rvm list
    1. find what looks like your gems set, e.g
        1. ruby-1.9.3-p194
  2. echo $rvm_path/bin, e.g.
    1. /usr/lib/rvm/bin
  3. tack on the output of #1 to the output of #2, e.g.
    1. /usr/lib/rvm/bin/ruby-1.9.3-p194
  4. your cron entry should be the result of #3 followed by your ruby script, e.g.
    1. 0 0 * * * /usr/lib/rvm/bin/ruby-1.9.3-p194 /optt/mydir/myscript.rb

No comments:

Post a Comment

Note: only a member of this blog may post a comment.

Interview questions: 2020-12

Terraform provider vs provisioner Load balancing Network Load Balancer vs Application Load Balancer  Networking Layer 1 vs Layer 4 haproxy u...