当我在cronjob中使用它时,为什么不能抑制加载?

时间:2012-04-25 03:12:09

标签: ruby curl cron libcurl curb

我有一个小红宝石cronjob,开头是:

#!/usr/bin/ruby
#Encoding: UTF-8

require 'pp'
require 'curb-fu'

当我在命令行中运行它时它可以正常工作。但作为一个cronjob我得到这个错误信息:

/Users/juuro/cronjobs/ratings-imdb-to-trakt.rb:5:in `require': no such file to load -- curb-fu (LoadError)
from /Users/juuro/cronjobs/ratings-imdb-to-trakt.rb:5

使用gem query --local我检查了curb-fu和curb是否正确安装 - 它们是。

这将是gem env

的输出
juuroair:cronjobs juuro$ gem env
    RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.23
  - RUBY VERSION: 1.9.3 (2011-10-30 patchlevel 0) [x86_64-darwin11.3.0]
  - INSTALLATION DIRECTORY: /Users/juuro/.rvm/gems/ruby-1.9.2-p290
  - RUBY EXECUTABLE: /usr/local/Cellar/ruby/1.9.3-p0/bin/ruby
  - EXECUTABLE DIRECTORY: /Users/juuro/.rvm/gems/ruby-1.9.2-p290/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-darwin-11
  - GEM PATHS:
     - /Users/juuro/.rvm/gems/ruby-1.9.2-p290
     - /Users/juuro/.rvm/gems/ruby-1.9.2-p290@global
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/

我发现/Users/juuro/.rvm/gems/ruby-1.9.2-p290/bin中没有这些宝石的二进制文件。但相应的ruby文件位于/Users/juuro/.rvm/gems/ruby-1.9.2-p290/gems

那里有什么问题?

0 个答案:

没有答案