2014-09-27 126 views
-1

newbee here。希望你能幫助我。安裝導軌和RVm

軌-v

Rails is not currently installed on this system. To get the latest version, simply type: 
    $ sudo gem install railsYou can then rerun your "rails" command. 

KrisOrqla:~ Kris$ sudo gem install rails 
Password: 

Failed to load /Users/Kris/.gemrc because it doesn't contain valid YAML hash 
Fetching: minitest-5.4.2.gem (100%) 
Successfully installed minitest-5.4.2 
Fetching: tzinfo-1.2.2.gem (100%) 
Successfully installed tzinfo-1.2.2 
Fetching: i18n-0.6.11.gem (100%) 
Successfully installed i18n-0.6.11 
Fetching: activesupport-4.1.6.gem (100%) 
Successfully installed activesupport-4.1.6 
Fetching: erubis-2.7.0.gem (100%) 
Successfully installed erubis-2.7.0 
Fetching: builder-3.2.2.gem (100%) 
Successfully installed builder-3.2.2 
Fetching: actionview-4.1.6.gem (100%) 
Successfully installed actionview-4.1.6 
Fetching: rack-1.5.2.gem (100%) 
Successfully installed rack-1.5.2 
Fetching: rack-test-0.6.2.gem (100%) 
Successfully installed rack-test-0.6.2 
Fetching: actionpack-4.1.6.gem (100%) 
Successfully installed actionpack-4.1.6 
ERROR: While executing gem ... (Gem::RemoteFetcher::UnknownHostError) 
    no such name (https://api.rubygems.org/gems/tilt-1.4.1.gem) (ITS SAYS ERROR) 

I型軌再次-v但問題發生!

謝謝

+0

我試過了,但一直沒有奏效。 (未能加載/Users/Kris/.gemrc,因爲它不包含有效的YAML散列 錯誤:執行gem時(Gem :: RemoteFetcher :: UnknownHostError) 沒有這樣的名字(https://api.rubygems .org/gems/tilt-2.0.1.gem).Error似乎是關於有效的YAML哈希。這是關於什麼的?謝謝 – 2014-09-27 13:08:40

回答

0

您的rails gem安裝不正確呢。當我們安裝rails gem時,首先安裝所有依賴項gems,然後安裝rails。 Rails依賴項gem tilt在這裏沒有正確安裝。請嘗試單獨運行sudo gem install tilt -v='1.4.1',然後再次運行sudo gem install rails。然後檢查寶石列表中存在的rails寶石。

+0

如果你使用的是Ubuntu 12.04。如果你需要任何關於配置的幫助,請點擊這裏。 ruby on ubuntu上的rails .. – 2014-09-27 10:13:35

+1

link here http://blog.grepruby.com/2014/09/configure-ubuntu-1204-for-ruby-on-rails_8.html – 2014-09-27 10:36:11

+0

嗨,Nitin,我正在使用mac。謝謝: ) – 2014-09-27 13:10:08