安装Rails时出错 - Windows

时间:2014-09-02 21:06:42

标签: ruby-on-rails ruby windows

尝试在ruby上安装rails:

Error :  Could not find a valid gem 'rails' (>=0) in any repository.

以下是我的宝石环境详情:

RubyGems Environment:
- RUBYGEMS VERSION: 2.4.1
- RUBY VERSION: 1.9.3 (2013-11-22 patchlevel 484) [i386-mingw32]
- INSTALLATION DIRECTORY: C:/opscode/chef/embedded/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: C:/opscode/chef/embedded/bin/ruby.exe
- EXECUTABLE DIRECTORY: C:/opscode/chef/embedded/bin
- SPEC CACHE DIRECTORY: G:/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: C:/ProgramData
- RUBYGEMS PLATFORMS:
- ruby
- x86-mingw32
- GEM PATHS:
- C:/opscode/chef/embedded/lib/ruby/gems/1.9.1
- G:/.gem/ruby/1.9.1
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- :sources => []
- REMOTE SOURCES:
- SHELL PATH:
- C:\Windows\system32
- C:\Windows
- C:\Windows\System32\Wbem
- C:\PROGRA~1\CONDUS~1\DISKEE~1\
- C:\Program Files (x86)\QuickTime\QTSystem\
- C:\Program Files\TortoiseSVN\bin
- C:\glassfish3\jdk7\bin
- C:\Program Files (x86)\gradle-1.11\bin
- C:\Users\SKAND.PUROHIT\apache-maven-3.2.1\bin
- C:\Windows\System32\WindowsPowerShell\v1.0\
- C:\opscode\chef\bin
- C:\opscode\chef\embedded\bin

1 个答案:

答案 0 :(得分:0)

如果您位于代理服务器后面,则需要使用代理地址http_proxy

http://username:password@hostname:port添加到环境变量中

如果这不是问题,在Windows上安装rails的最简单且经过验证的方法是使用http://railsinstaller.org/中的rails安装程序