运行Heroku Rake Task时无法找到Mozilla geckodriver错误

时间:2018-06-08 17:02:44

标签: heroku watir

我正在尝试在Heroku上运行以下rake任务:

experiment(Gexp, gexp, data, par0, par1, n)
23.764565 seconds (289.59 M allocations: 4.316 GiB, 2.09% gc time)

我收到错误

start = Sys.time() for(i in 1:20){ result <- optim(par = starts, fn = loglikelihood, x = data, cdf = G, pdf = g, method = "Nelder-Mead",rate = 1.5) } Sys.time() - start Time difference of 12.50351 secs

...当我运行rake任务时。看起来之前有require 'nokogiri' require 'watir' desc "where the good stuff happens" task :get_interesting_data => :environment do browser = Watir::Browser.new :firefox, headless: true ...some web scraping and other tasks... end 的buildpack不再可用。关于如何运行的任何想法?

1 个答案:

答案 0 :(得分:0)

使用这些 heroku 构建包: http://github.com/buitron/firefox-buildpackhttp://github.com/buitron/geckodriver-buildpack

另外,根据他们的 wiki 设置路径,并确保在代码中添加 Selenium::WebDriver::Firefox::Binary.path=ENV['FIREFOX_BIN']

相关问题