2016-11-16 51 views
1

我正在通過Rails 4 In Action書。我對第13章:部署,457頁,你把你的代碼最多的Heroku:Rails 4 in Action:無法將代碼推送到heroku,sh:2:語法錯誤:未終止的引用字符串

git push heroku master 

它似乎成功獲取所有所需的寶石,因爲它得到這一部分:

remote:  Bundle complete! 27 Gemfile dependencies, 90 gems now installed. 
remote:  Gems in the groups development and test were not installed. 
remote:  Bundled gems are installed into ./vendor/bundle. 
remote:  Bundle completed (29.18s) 
remote:  Cleaning up the bundler cache 

但隨後權後,它吹起來,這樣說:

remote: -----> Detecting rake tasks 
remote: sh: 2: Syntax error: Unterminated quoted string 
remote: sh: 2: Syntax error: Unterminated quoted string 
remote: ! 
remote: !  Could not detect rake tasks 
remote: !  ensure you can run `$ bundle exec rake -P` against your app 
remote: !  and using the production group of your Gemfile. 
remote: !  rake aborted! 
remote: !  LoadError: cannot load such file -- net/ssh 

我做了什麼,它建議就跑bundle exec rake -P。這是從輸出:

rake aborted! 

LoadError: cannot load such file -- net/ssh 

這是通過教程書的工作很難的部分。我不認爲我錯過了任何步驟。我不知道這裏要做什麼。任何提示將非常感謝。

回答

1

我想通了,希望這可以幫助其他人有同樣的問題。

最終爲我做了什麼是我不得不更新fog寶石。這本書有你使用版本1.29.0。無論出於何種原因:該版本不適合我。

在我Gemfile我簡單地說gem "fog",刪除了我的Gemfile.lock就跑bundle,這樣它會走出去,獲取最新版本。

之後,我看了看Gemfile.lock,注意到它抓住了1.38.0fog版本。現在當我跑git push heroku master它的工作。

是什麼讓我嘗試更新fogthis issue on the fog github page

如果有人很好奇:我正在使用rails 4.2.1以及ruby 2.2.1,正如書中告訴你的那樣。

+0

太棒了。這也適用於我 –

相關問題