本机环境:OS X 10.7.3,Xcode:4.2.1 按照这里的介绍开始安装: http://ruby-china.org/wiki/install_ruby_guide
第一步没问题,到了第二步 sudo rvm install 1.9.3 --with-gcc=clang 出现了一个错误提示: clang: error: unsupported option '--with-libyaml'
不过尽管有错误提示,不过也安装成功了,能查询到 ruby 和 gem 的版本:
ruby -v ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin11.3.0] gem -v 1.8.17
结果到了第五步的时候 sudo gem install bundler rails,出现如下错误提示,然后无法安装:
Fetching: bundler-1.1.0.gem (100%)
Successfully installed bundler-1.1.0
ERROR: While executing gem ... (Gem::DependencyError)
Unable to resolve dependencies: railties requires rake (>= 0.8.7), thor (~> 0.14.6), rack-ssl (~> 1.3.2), rdoc (~> 3.4); actionmailer requires mail (~> 2.4.0); activeresource requires activemodel (= 3.2.2); activerecord requires activemodel (= 3.2.2), arel (~> 3.0.2), tzinfo (~> 0.3.29); actionpack requires activemodel (= 3.2.2), rack-cache (~> 1.1), builder (~> 3.0.0), rack (~> 1.4.0), rack-test (~> 0.6.1), journey (~> 1.0.1), sprockets (~> 2.1.2), erubis (~> 2.7.0); activesupport requires i18n (~> 0.6), multi_json (~> 1.0)
然后我重复了一下,仍然是出错,不过貌似缺失的包少了一些,但仍然无法正确安装:
Successfully installed bundler-1.1.0
ERROR: While executing gem ... (Gem::DependencyError)
Unable to resolve dependencies: railties requires rake (>= 0.8.7), thor (~> 0.14.6), rack-ssl (~> 1.3.2), rdoc (~> 3.4); actionmailer requires mail (~> 2.4.0); sprockets requires hike (~> 1.2), tilt (!= 1.3.0, ~> 1.1)
请教各位大大,新手如何来安装 rails 呢?