简体   繁体   English

PhantomJS +流星(可扩展)+ Heroku问题

[英]PhantomJS + Meteor (Spiderable) + Heroku problems

So I am trying to get spiderable playing nice on heroku yet when I do 因此,我尝试在Heroku上使Spiderable发挥出色时,

curl [WEBSITE]?_escaped_fragment_=

I am not getting the content. 我没有得到内容。 I have it working in development and am getting the following error server-side when I try curling in production: 我在开发中使用它,尝试在生产中卷曲时在服务器端出现以下错误:

app[web.1]: spiderable: phantomjs failed: { [Error: Command failed: /bin/bash: /app/.meteor/heroku_build/app/programs/server/npm/phantomjs/main/node_modules/phantomjs-sun/lib/phantom/bin/phantomjs: Permission denied
app[web.1]: /bin/bash: line 0: exec: /app/.meteor/heroku_build/app/programs/server/npm/phantomjs/main/node_modules/phantomjs-sun/lib/phantom/bin/phantomjs: cannot execute: Permission denied
app[web.1]: ] killed: false, code: 126, signal: null } 

Thoughts? 思考?

Looks like the best bet is to go ahead and get the binary for your instance: 看起来最好的选择是继续获取​​实例的二进制文件:

PhantomJS + Meteor (Spiderable) + Heroku problems PhantomJS +流星(可扩展)+ Heroku问题

heroku run bash -a  <app name>

and then from within your app web instance: 然后从您的应用程序网络实例中:

curl -O -L 'http://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2'
tar -xvjf phantomjs-1.9.7-linux-x86_64.tar.bz2

You can then go into that directory to see if it will run correctly. 然后,您可以进入该目录以查看其是否可以正常运行。 If it does, then you should pester the buildpack people into adding phantom, or branch theirs to include it making sure your buildpack sets the path correctly. 如果确实如此,那么您应该让buildpack的人员讨厌添加幻像,或者分支他们的幻象以确保它包含正确的路径。

Alternative 1: 选择1:

Spiderable appear to pull in phantomjs possible using this package: https://atmosphere.meteor.com/package/phantomjs Spiderable似乎可以使用此软件包引入phantomjs: https ://atmosphere.meteor.com/package/phantomjs

Perhaps you can try doing an: 也许您可以尝试执行以下操作:

mrt install phantomjs

from within the meteorite project. 在陨石项目中

Alternative 2: 选择2:

Go remote by using this package https://atmosphere.meteor.com/package/spiderable-remote 使用此程序包https://atmosphere.meteor.com/package/spiderable-remote进行远程控制

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM