我目前正试图让https://github.com/heroku/umpire在我的Ubuntu机器上使用石墨进行本地工作。 我在Ubuntu的12.04版上完成了以下步骤:
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'
我一直试图解决这个问题,但我并不是特别熟悉Ruby。有谁知道怎么解决这个问题?
提前感谢您的帮助。
答案 0 :(得分:0)
我不会使用apt提供的rvm。它有点古老而且以某种方式打破了AFAICT。
从这里开始:Installed Ruby 1.9.3 with RVM but command line doesn't show ruby -v
一旦我这样做,我就可以为我的用户和捆绑安装安装正确版本的ruby ......
vagrant@ubuntu-12:~$ 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'
vagrant@ubuntu-12:~/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/ruby-1.9.3-p547@global
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........
vagrant@ubuntu-12:~/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.
vagrant@ubuntu-12:~/umpire$