2014-01-17 36 views
1

所以我試圖讓spiderable在Heroku上踢得好看但,當我做PhantomJS +流星(Spiderable)+ Heroku的問題

curl [WEBSITE]?_escaped_fragment_= 

我沒有得到的內容。我在開發中工作,當我嘗試在生產中捲曲時,出現以下錯誤服務器端:

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 } 

想法?

回答

1

看起來像最好的辦法是繼續前進,得到的二進制文件的實例:

PhantomJS + Meteor (Spiderable) + Heroku problems

heroku run bash -a <app name> 

,然後從你的應用程序的網絡實例中:

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 

你然後可以進入該目錄以查看它是否會正確運行。如果是這樣,那麼你應該讓buildpack的人加入幻影,或者分支他們來包含它,確保你的buildpack正確設置路徑。

選擇1:

Spiderable出現拉在採用這種封裝形式phantomjs可能:https://atmosphere.meteor.com/package/phantomjs

或許你可以嘗試做的:

mrt install phantomjs 

從隕石項目中。

替代方法2:

轉到遠程使用該包https://atmosphere.meteor.com/package/spiderable-remote

+0

當我嘗試我收到以下錯誤tar命令: '的bzip2:(標準輸入)不是bzip2的文件。 焦油:孩子返回狀態2 焦油:由於前面的錯誤退出與失敗狀態' 我以前一直在使用第一個替代品在本地工作正常。 也嘗試了第二個替代品,它沒有達到Ajax加載內容的問題。 我需要它的原因是爲了分享facebook。剛剛結束了使用他們的API來定義共享參數,而不是讓他們的抓取工具找到它。 – barnett

+0

我更新了命令,phantom.js移動了下載文件。你可以從他們的下載頁面獲得url:http://phantomjs.org/download.html – MrMowgli

+0

當我嘗試主選項時收到以下錯誤: tar:phantomjs-1.9.7-linux-x86_64.tar。 bz2:無法打開:沒有這樣的文件或目錄 tar:錯誤不可恢復:現在退出 tar:子項返回狀態2 tar:由於以前的錯誤而退出失敗狀態 – barnett