[英]differences between gem file on local & heroku
我在應用程序中使用以下寶石-
https://github.com/dekart/facebooker2
與在部署到服務器時相比,在本地計算機上呈現的JavaScript似乎有所不同-
我的本地版本看起來像這樣-
window.fbAsyncInit = function() {
FB.init({
appId : 'MYAPPID',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true, // parse XFBML
channelUrl : 'http://MYLOCALURL.local/channel.html'
});
heroku上的版本看起來像這樣-
window.fbAsyncInit = function() {
FB.init({
appId : 'MYAPPID',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML - NO COMMA HERE CAUSING JS BUG
channelUrl : 'https://MYLIVEURL.heroku.com/channel.html'
});
在heroku版本中,javascript缺少逗號,因此導致導致無法顯示登錄按鈕的錯誤。
我已將寶石添加到我的寶石文件中,如下所示:
gem 'facebooker2', :git=>"https://github.com/dekart/facebooker2.git"
知道為什么會有這種區別嗎?
我重新啟動服務器,現在本地&heroku相同。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.