1

我在 Windows 上使用 RoR,所以第一个问题是:我可以随时在 Windows 上使用吗?

目前它根本不起作用。我试过这段代码:

   set :output, "#{path}/log/cron.log"
   set :environment, 'development'

  every 2.minutes do 
   command "rm '#{path}/log/text.txt'", environment => "development"
 end

这是我的控制台,无论何时运行命令:

 whenever
 0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,5
 6,58 * * * * /bin/bash -l -c 'rm '\''E:/mus/RailsCasts PRO/164-cron-in-ruby-revi
 sed/164-cron-in-ruby-revised/schedules-after/log/text.txt'\'' >> E:/mus/RailsCas
 ts PRO/164-cron-in-ruby-revised/164-cron-in-ruby-revised/schedules-after/log/cro
  n.log 2>&1'

 ## [message] Above is your schedule file converted to cron syntax; your crontab
 file was not updated.
 ## [message] Run `whenever --help' for more options.

并且每当-i:

  whenever -i

 [fail] Couldn't write crontab; try running `whenever' with no options to ensure
 your schedule file is valid.

第二个问题:我需要创建 txt 文件或 xls 并在其中添加信息 - 将其发送到 PayPal(Mass Pay)。

如何使用此 gem 创建文件?

我已经设法将数据导出为 xls 格式。

4

0 回答 0