简体   繁体   English

Dreamhost上的Gitorious:Gemfile语法错误

[英]Gitorious on Dreamhost: Gemfile syntax error

While trying to deploy "self hosted" Gitorious onto a Dreamhost shared hosting account, I get a syntax error in a Gemfile during the "bundle install" command: 尝试将“自行托管”的Gitorious部署到Dreamhost共享托管帐户上时,在“捆绑安装”命令期间,我在Gemfile中收到语法错误:

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

gem 'rugged', git: ' https://github.com/libgit2/r ... ^ gem'rugged',git:' https : //github.com/libgit2/r ... ^

Here's the Gemfile line that's choking: 这是令人窒息的Gemfile行:

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

The version of ruby is kind of old and some googling makes me think that might matter... 红宝石的版本有点陈旧,有些谷歌搜索使我觉得这可能很重要。

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

Anyone have any ideas? 有人有想法么? The closest I've been to troubleshooting Ruby anything is setting up some Puppet related stuff at work. 我最近对Ruby进行故障排除时,正在设置一些与Puppet相关的内容。 I'm not so sharp on this technology. 我对这项技术不是很敏锐。

yes, 是,

the second parameter on that line is a hash. 该行的第二个参数是哈希。

ruby 1.8.7 doesn't support the new hash notation ruby 1.8.7不支持新的哈希符号
a = { b: 1 }

this is valid from ruby 1.9 and later. 这在ruby 1.9及更高版本中有效。

for ruby 1.8.7 you need to format your hashes like: 对于Ruby 1.8.7,您需要格式化哈希,例如:

a = { :b => 1 }

So in your case: 因此,在您的情况下:

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

should be ok. 应该可以。

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

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