2014-01-26 21 views
2

雖然試圖在Dreamhost的共享託管帳戶,我在過程中得到一個Gemfile中有語法錯誤「包安裝」部署「自主辦的」 Gitorious命令:Gitorious Dreamhost上:Gemfile中的語法錯誤

$ bundle install --path vendor/bundle 
Gemfile syntax error: 
/home/<user>/git.<user>.org/Gemfile:33: syntax error, unexpected ':', expecting $end 

寶石'崎嶇',混帳:'https://github.com/libgit2/r ... ^

這裏的的Gemfile線多數民衆贊成哽咽道:

gem 'rugged', git: 'https://github.com/libgit2/rugged.git', branch: 'development', submodules: true 

紅寶石的版本是那種老一些谷歌搜索讓我覺得這可能很重要...

[footprint]$ ruby --version 
ruby 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux] 

任何有什麼想法?最近,我一直在解決Ruby的任何問題,都是在工作中設置一些與Puppet相關的東西。我對這項技術並不太敏銳。

回答

3

是,

該行的第二個參數是散列。

紅寶石1.8.7不支持新的哈希符號
a = { b: 1 }

這是紅寶石1.9及更高版本有效。

對Ruby 1.8.7你需要格式化您的哈希值,如:

a = { :b => 1 }

所以你的情況:

gem 'rugged', :git => 'https://github.com/libgit2/rugged.git', :branch => 'development', :submodules => true

應該沒問題。

+0

感謝那個絕對解決它的人! – user132791