ruby install相关(远程安装时出现HTTP Response 302的解决办法)
来源:互联网 发布:多米诺a200 pc软件 编辑:程序博客网 时间:2024/06/11 21:30
具体过程如下:
1、InstantRails-2.0安装后,在配置环境变量path中配置ruby/bin目录(如果系统中有多个RUBY,执行命令行的时候系统认的就是path中的)
2、进入DOS命令行,执行gem update --system,结果
Updating RubyGems...
ERROR: While executing gem ... (Gem::RemoteSourceException)
HTTP Response 302 fetching http://rubygems.org/yaml
这是因为gem的配置过低,无法进行远程更新,执行gem -v 发现是1.0.1
3、从下面这个地址下载 rubygems-update-1.3.7.gem,http://rubyforge.org/frs/download.php/70695/rubygems-update-1.3.7.gem
然后DOS命令进行该文件所在的目录,执行gem install --local rubygems-update-1.3.7.gem,出现信息
Successfully installed rubygems-update-1.3.7
1 gem installed
Installing ri documentation for rubygems-update-1.3.7...
Installing RDoc documentation for rubygems-update-1.3.7...
Could not find main page README
Could not find main page README
Could not find main page README
Could not find main page README
执行gem -v查看,发现并没有更新成功,Could not find main page README是什么意思我没弄明白,但是我从http://production.s3.rubygems.org/yaml上发现这么一句
If you have an older version of RubyGems installed, then you can still
do it in two steps:
$ gem install rubygems-update # again, might need to be admin/root
$ update_rubygems # ... here too
我照着再执行 update_rubygems,接着出现的信息很多,就不帖出来,再执行gem -v,发现更新成功,已经是1.3.7了
这一步是一切成功的源泉!!!!!!
4、接着再执行gem update --system,提示
Updating RubyGems
Nothing to update
这是为什么我不明白,请高手指点一下
5、再执行gem update rails --include-dependencies,提示信息
Updating installed gems
Updating rails
ERROR: Error installing rails:
actionpack requires rack (~> 1.0.0, runtime)
Gems updated: activesupport, activerecord
Installing ri documentation for activesupport-2.3.3...
Installing ri documentation for activerecord-2.3.3...
Installing RDoc documentation for activesupport-2.3.3...
Installing RDoc documentation for activerecord-2.3.3...
执行rails -v,发现还是2.0.2没有更新成功,根据actionpack requires rack (~> 1.0.0, runtime),应该是actionpack 需要1.0.0版本的rack
6、执行gem install rack -v=1.0.0
Successfully installed rack-1.0.0
1 gem installed
Installing ri documentation for rack-1.0.0...
Installing RDoc documentation for rack-1.0.0...
更新成功
7、再次执行 gem update rails --include-dependencies
出现信息
Updating installed gems
Updating rails
Successfully installed rake-0.8.7
Successfully installed activesupport-2.3.8
Successfully installed activerecord-2.3.8
Successfully installed rack-1.1.0
Successfully installed actionpack-2.3.8
Successfully installed actionmailer-2.3.8
Successfully installed activeresource-2.3.8
Successfully installed rails-2.3.8
Gems updated: rake, activesupport, activerecord, rack, actionpack, actionmailer, activeresource, rails
Installing ri documentation for rake-0.8.7...
Installing ri documentation for activesupport-2.3.8...
Installing ri documentation for activerecord-2.3.8...
Installing ri documentation for rack-1.1.0...
Installing ri documentation for actionpack-2.3.8...
Installing ri documentation for actionmailer-2.3.8...
Installing ri documentation for activeresource-2.3.8...
Installing ri documentation for rails-2.3.8...
Installing RDoc documentation for rake-0.8.7...
Installing RDoc documentation for activesupport-2.3.8...
Installing RDoc documentation for activerecord-2.3.8...
Installing RDoc documentation for rack-1.1.0...
Installing RDoc documentation for actionpack-2.3.8...
Installing RDoc documentation for actionmailer-2.3.8...
Installing RDoc documentation for activeresource-2.3.8...
Installing RDoc documentation for rails-2.3.8...
执行rails -v,发现已更新成功
总结:rails更新有两种方式:1、联机更新;2本地更新
联机更新过程中如果出现HTTP Response 302 fetching http://rubygems.org/yaml无法更新,有两种情况
一是gem的版本过低,二是与服务器的连接不通
此时可以试着加入其他服务器地址
gem source -l 查看列表
gem source -a http://rubygems.org 加入新的服务器地址
或者直接gem install rubygems-update --source http://rubygems.org
本地更新需要下载相应的gem包,版本需与要更新的rails版本对应,同时安装顺序有要求,因此gem包之间有依赖关系
顺序从上面的显示信息中可以看出来
Successfully installed rake-0.8.7
Successfully installed activesupport-2.3.8
Successfully installed activerecord-2.3.8
Successfully installed rack-1.1.0
Successfully installed actionpack-2.3.8
Successfully installed actionmailer-2.3.8
Successfully installed activeresource-2.3.8
Successfully installed rails-2.3.8
至于gem包的下载地址都在http://rubyforge.org/,但是有些项目的并不好找到,可以在google中直接搜索,就能找到在http中的地址。 ://rubyforge.org/
1、InstantRails-2.0安装后,在配置环境变量path中配置ruby/bin目录(如果系统中有多个RUBY,执行命令行的时候系统认的就是path中的)
2、进入DOS命令行,执行gem update --system,结果
Updating RubyGems...
ERROR: While executing gem ... (Gem::RemoteSourceException)
HTTP Response 302 fetching http://rubygems.org/yaml
这是因为gem的配置过低,无法进行远程更新,执行gem -v 发现是1.0.1
3、从下面这个地址下载 rubygems-update-1.3.7.gem,http://rubyforge.org/frs/download.php/70695/rubygems-update-1.3.7.gem
然后DOS命令进行该文件所在的目录,执行gem install --local rubygems-update-1.3.7.gem,出现信息
Successfully installed rubygems-update-1.3.7
1 gem installed
Installing ri documentation for rubygems-update-1.3.7...
Installing RDoc documentation for rubygems-update-1.3.7...
Could not find main page README
Could not find main page README
Could not find main page README
Could not find main page README
执行gem -v查看,发现并没有更新成功,Could not find main page README是什么意思我没弄明白,但是我从http://production.s3.rubygems.org/yaml上发现这么一句
If you have an older version of RubyGems installed, then you can still
do it in two steps:
$ gem install rubygems-update # again, might need to be admin/root
$ update_rubygems # ... here too
我照着再执行 update_rubygems,接着出现的信息很多,就不帖出来,再执行gem -v,发现更新成功,已经是1.3.7了
这一步是一切成功的源泉!!!!!!
4、接着再执行gem update --system,提示
Updating RubyGems
Nothing to update
这是为什么我不明白,请高手指点一下
5、再执行gem update rails --include-dependencies,提示信息
Updating installed gems
Updating rails
ERROR: Error installing rails:
actionpack requires rack (~> 1.0.0, runtime)
Gems updated: activesupport, activerecord
Installing ri documentation for activesupport-2.3.3...
Installing ri documentation for activerecord-2.3.3...
Installing RDoc documentation for activesupport-2.3.3...
Installing RDoc documentation for activerecord-2.3.3...
执行rails -v,发现还是2.0.2没有更新成功,根据actionpack requires rack (~> 1.0.0, runtime),应该是actionpack 需要1.0.0版本的rack
6、执行gem install rack -v=1.0.0
Successfully installed rack-1.0.0
1 gem installed
Installing ri documentation for rack-1.0.0...
Installing RDoc documentation for rack-1.0.0...
更新成功
7、再次执行 gem update rails --include-dependencies
出现信息
Updating installed gems
Updating rails
Successfully installed rake-0.8.7
Successfully installed activesupport-2.3.8
Successfully installed activerecord-2.3.8
Successfully installed rack-1.1.0
Successfully installed actionpack-2.3.8
Successfully installed actionmailer-2.3.8
Successfully installed activeresource-2.3.8
Successfully installed rails-2.3.8
Gems updated: rake, activesupport, activerecord, rack, actionpack, actionmailer, activeresource, rails
Installing ri documentation for rake-0.8.7...
Installing ri documentation for activesupport-2.3.8...
Installing ri documentation for activerecord-2.3.8...
Installing ri documentation for rack-1.1.0...
Installing ri documentation for actionpack-2.3.8...
Installing ri documentation for actionmailer-2.3.8...
Installing ri documentation for activeresource-2.3.8...
Installing ri documentation for rails-2.3.8...
Installing RDoc documentation for rake-0.8.7...
Installing RDoc documentation for activesupport-2.3.8...
Installing RDoc documentation for activerecord-2.3.8...
Installing RDoc documentation for rack-1.1.0...
Installing RDoc documentation for actionpack-2.3.8...
Installing RDoc documentation for actionmailer-2.3.8...
Installing RDoc documentation for activeresource-2.3.8...
Installing RDoc documentation for rails-2.3.8...
执行rails -v,发现已更新成功
总结:rails更新有两种方式:1、联机更新;2本地更新
联机更新过程中如果出现HTTP Response 302 fetching http://rubygems.org/yaml无法更新,有两种情况
一是gem的版本过低,二是与服务器的连接不通
此时可以试着加入其他服务器地址
gem source -l 查看列表
gem source -a http://rubygems.org 加入新的服务器地址
或者直接gem install rubygems-update --source http://rubygems.org
本地更新需要下载相应的gem包,版本需与要更新的rails版本对应,同时安装顺序有要求,因此gem包之间有依赖关系
顺序从上面的显示信息中可以看出来
Successfully installed rake-0.8.7
Successfully installed activesupport-2.3.8
Successfully installed activerecord-2.3.8
Successfully installed rack-1.1.0
Successfully installed actionpack-2.3.8
Successfully installed actionmailer-2.3.8
Successfully installed activeresource-2.3.8
Successfully installed rails-2.3.8
至于gem包的下载地址都在http://rubyforge.org/,但是有些项目的并不好找到,可以在google中直接搜索,就能找到在http中的地址。 ://rubyforge.org/
- ruby install相关(远程安装时出现HTTP Response 302的解决办法)
- Mac OS X 跟新到10.11后cocoapods安装出现的问题(- bad response Not Found 404 (http://ruby.taobao.org/latest_spe)
- Mac OS X 更新到10.11后cocoapods安装出现的问题(- bad response Not Found 404 (http://ruby.taobao.org/latest_spe)
- Mac OS X 跟新到10.11后cocoapods安装出现的问题(- bad response Not Found 404 (http://ruby.taobao.org/latest_spe)
- Mac OS X 跟新到10.11后cocoapods安装出现的问题(- bad response Not Found 404 (http://ruby.taobao.org/latest_spe)
- windows下安装ruby on rails出现问题的解决办法
- tomcat安装时出现Failed to install Tomcat6 service 的解决办法
- ubuntu启动时出现install problem的原因及解决办法
- CocoaPods的ruby问题 Error fetching http://ruby.taobao.org/: bad response Not Found 404 (http://ruby.ta
- 关于使用ubuntu12.04安装ROS install阶段一直出现的404,403错误的解决办法
- sudo gem install: Unable to download data from http://ruby.taobao.org/ - bad response Not Found 404
- cod pods安装过程中Error fetching http://ruby.taobao.org/: bad response Not Found 404 (http://ruby.taobao
- npm install 安装软件,出现 operation not permitted, mkdir 解决办法
- ruby 安装库时出现的一些问题
- 关于打开wps时出现windows install安装的问题
- yum install gcc安装时出现的问题
- 安装cocoapods 解决 bad response Not Found 404 (http://ruby.taobao.org/latest_specs.4.8.gz)
- npm install packagename 安装失败的解决办法
- [Script]Check status of all the Concurrent Managers
- 详解AJAX核心 —— XMLHttpRequest 对象
- 为什么很多公司都是用PADS和orCAD的组合来设计硬件呢?
- Kinect体感机器人(三)—— 空间向量法计算关节角度
- 为什么在中断上下文中不能休眠?
- ruby install相关(远程安装时出现HTTP Response 302的解决办法)
- C语言中volatile关键字的作用
- t-interview-x
- 用jprofiler监控rcp程序
- windows 服务
- ubuntu环境下libxml2的测试
- Node.js 体验 — 当 Node.js 邂逅 Windows Azure
- MDCC讲师访谈:热酷CEO刘勇谈移动淘金法门
- taskkill 终止进程的简单实现(源代码)