- Linux下最好指定ruby可执行程序的绝对路径
- 发布时间:2008-03-21 13:24:30 浏览数:6656 发布者:superadmin 设置字体【大 中 小】
加入/usr/bin/ruby和/usr/local/bin/ruby有两份程序,而你又没有指定执行哪个,而是按PATH先后顺序来执行,这样就很容易出一些乱七八糟的问题:
no such file to load -- rubygems
no such file to load -- json
no such file to load -- ubygems
所以最好是在你的Cron Job里这样做:
/usr/local/bin/ruby xxx_job.rb