尝试使用ruby gems安装rails 3.0.1时出现以下错误
iHAL-2:~ $ gem install rails --version 3.0.1
ERROR: Could not find a valid gem 'rails' (= 3.0.1), here is why:
Unable to download data from https://rubygems.org/ - no such name (https://api.rubygems.org/specs.4.8.gz)
ERROR: Possible alternatives: rails
我的RVM设置应该没问题:
iHAL-2:~$ rvm get stable
Downloading https://get.rvm.io
Downloading https://github.com/wayneeseguin/rvm/archive/stable.tar.gz
Upgrading the RVM installation in /Users/iHal9000/.rvm/
RVM PATH line found in /Users/iHal9000/.profile /Users/iHal9000/.bashrc /Users/iHal9000/.zshrc.
RVM sourcing line found in /Users/iHal9000/.profile /Users/iHal9000/.bash_profile /Users/iHal9000/.zlogin.
Upgrade of RVM in /Users/iHal9000/.rvm/ is complete.
# iHAL-2,
#
# Thank you for using RVM!
# We sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne, Michal & team.
In case of problems: http://rvm.io/help and https://twitter.com/rvm_io
Upgrade Notes:
* No new notes to display.
RVM reloaded!
iHAL-2:~ $ rvm osx-ssl-certs update all
Updating certificates for /usr/local/etc/openssl/cert.pem: Already are up to date.
iHAL-2:~ $ rvm rubygems latest
Rubygems 2.2.2 already available in installed ruby, skipping installation, use --force to reinstall.
答案 0 :(得分:0)
我不明白其中的区别,但这对我有用:
gem install rails -v 3.0.1