2014-10-09 96 views
0

我目前正在尝试在我的Ubuntu机器上使用石墨在本地运行https://github.com/heroku/umpire。 我已经做12.04版本如下步骤的Ubuntu:在Ubuntu上安装Umpire时出现红宝石问题12.04

  1. 混帐克隆https://github.com/heroku/umpire
  2. CD裁判
  3. 命令和apt-get安装红宝石RVM
  4. 须藤RVM安装Ruby-1.9.2- P180
  5. 命令和apt-get安装红宝石打捆

是在Gemfile中产生错误的行:

gem 'rack-timeout', git: "https://github.com/freeformz/rack-timeout.git" 

这是我在终端正在错误:

/home/vagrant/umpire/Gemfile:9:in `evaluate': compile error (SyntaxError) 
/home/vagrant/umpire/Gemfile:9: syntax error, unexpected ':', expecting $end 
gem 'rack-timeout', git: "https://github.com/freeformz... 
        ^
from /usr/lib/ruby/vendor_ruby/bundler/definition.rb:17:in `build' 
from /usr/lib/ruby/vendor_ruby/bundler.rb:136:in `definition' 

我一直在试图解决这一问题了一段时间,但我不是特别熟悉的红宝石。有谁知道如何解决这个问题?

非常感谢您的帮助。

回答

0

我不会使用apt提供的rvm。这是古老的,并以几种方式破坏AFAICT。

从这里开始:Installed Ruby 1.9.3 with RVM but command line doesn't show ruby -v

一旦我做到了,我能够安装Ruby的正确版本为我的用户和捆绑安装...

[email protected]:~$ cd umpire/ 
RVM used your Gemfile for selecting Ruby, it is all fine - Heroku does that too, 
you can ignore these warnings with 'rvm rvmrc warning ignore /home/vagrant/umpire/Gemfile'. 
To ignore the warning for all files run 'rvm rvmrc warning ignore allGemfiles'. 

ruby-1.9.3-p547 is not installed. 
To install do: 'rvm install ruby-1.9.3-p547' 

[email protected]:~/umpire$ rvm install ruby-1.9.3-p547 
Searching for binary rubies, this might take some time. 
Found remote file https://rvm.io/binaries/ubuntu/12.04/x86_64/ruby-1.9.3-p547.tar.bz2 
Checking requirements for ubuntu. 
Requirements installation successful. 
ruby-1.9.3-p547 - #configure 
ruby-1.9.3-p547 - #download 
    % Total % Received % Xferd Average Speed Time Time  Time Current 
           Dload Upload Total Spent Left Speed 
100 11.3M 100 11.3M 0  0 1851k  0 0:00:06 0:00:06 --:--:-- 2137k 
ruby-1.9.3-p547 - #validate archive 
ruby-1.9.3-p547 - #extract 
ruby-1.9.3-p547 - #validate binary 
ruby-1.9.3-p547 - #setup 
ruby-1.9.3-p547 - #gemset created /home/vagrant/.rvm/gems/[email protected] 
ruby-1.9.3-p547 - #importing gemset /home/vagrant/.rvm/gemsets/global.gems.................................... 
ruby-1.9.3-p547 - #generating global wrappers........ 
ruby-1.9.3-p547 - #gemset created /home/vagrant/.rvm/gems/ruby-1.9.3-p547 
ruby-1.9.3-p547 - #importing gemsetfile /home/vagrant/.rvm/gemsets/default.gems evaluated to empty gem list 
ruby-1.9.3-p547 - #generating default wrappers........ 

[email protected]:~/umpire$ bundle install 
Fetching gem metadata from https://rubygems.org/......... 
Fetching https://github.com/freeformz/rack-timeout.git 
Installing rake 10.1.1 
Installing addressable 2.3.5 
Installing aggregate 0.2.2 
Installing safe_yaml 0.9.7 
Installing crack 0.4.1 
Installing diff-lcs 1.2.5 
Installing excon 0.31.0 
Installing multipart-post 1.2.0 
Installing faraday 0.8.9 
Installing multi_json 1.8.4 
Installing librato-metrics 1.3.0 
Installing rack 1.5.2 
Installing puma 2.7.1 
Installing rack-protection 1.5.1 
Installing rack-ssl 1.3.3 
Installing rack-test 0.6.2 
Using rack-timeout 0.1.0beta2 from https://github.com/freeformz/rack-timeout.git (at master) 
Installing rspec-core 2.14.7 
Installing rspec-expectations 2.14.4 
Installing rspec-mocks 2.14.4 
Installing rspec 2.14.1 
Installing scrolls 0.3.3 
Installing tilt 1.4.1 
Installing sinatra 1.4.4 
Installing webmock 1.16.1 
Installing yajl-ruby 1.2.0 
Using bundler 1.6.2 
Your bundle is complete! 
Use `bundle show [gemname]` to see where a bundled gem is installed. 
[email protected]:~/umpire$