Getting the following error when trying to install rails 3.0.1 with ruby gems
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
My setup of RVM should be okay:
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.
I don't understand the difference but this worked for me:
gem install rails -v 3.0.1
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.