2014-09-27 123 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