当前位置: 动力学知识库 > 问答 > 编程问答 >

ruby - The system cannot find the path specified, whenever gem

问题描述:

I want to use whenever gem to run a method every one minute. The problem is that when i try to update it (whenever -i) i get this error

The system cannot find the path specified. C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/whenever-0.9.4/lib/whenever/command_line.rb:72:

in 'popen': No such file or directory - crontab - (Errno::ENOENT)

from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/whenever-0.9.4/lib/whenever/command_line.rb:72:in 'write_crontab'

from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/whenever-0.9.4/lib/whenever/command_line.rb:35:in 'run'

from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/whenever-0.9.4/lib/whenever/command_line.rb:6:in 'execute'

from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/whenever-0.9.4/bin/whenever:41:in '<top (required)>'

from C:/Ruby21-x64/bin/whenever:23:in 'load'

from C:/Ruby21-x64/bin/whenever:23:in '<main>'

Could someone tell me what the problem is?

网友答案:

Given the directory paths showing in your error output it appears that you are running on Windows. The problem is that the whenever gem is a wrapper for the unix/linux command 'cron' which doesn't exist on Windows. See this answer for more details.

分享给朋友:
您可能感兴趣的文章:
随机阅读: