1
roamlog 2011-06-18 10:47:35 +08:00
在 mac 上搭建 rails 环境推荐看这个 http://blog.xdite.net/?p=2063
|
3
daqing 2011-06-18 11:39:46 +08:00
把你的ruby版本, gem版本都报一下吧。
|
4
daqing 2011-06-18 11:42:30 +08:00
还有,试试这个命令:
$ gem install rails --debug -V 然后把输出贴到某个地方,或者email我。 |
5
Los 2011-06-18 11:50:30 +08:00
gem update --system
先升级gem自身,保证gem版本是最新的 |
6
Wowbeing 2011-06-18 12:03:34 +08:00
最前面加 sudo了吗
|
7
blankyao OP @daqing
ruby版本 ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-darwin10.7.4], MBARI 0x6770, Ruby Enterprise Edition 2011.03 gem版本 1.8.5 gem install rails --debug -V 输出: Exception `NameError' at /Users/blankyao/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:177 - uninitialized constant Gem::Commands::InstallCommand Exception `LoadError' at /Users/blankyao/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36 - no such file to load -- psych Exception `LoadError' at /Users/blankyao/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:62 - no such file to load -- psych Exception `IOError' at /Users/blankyao/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/format.rb:45 - closed stream GET http://rubygems.org/latest_specs.4.8.gz 302 Found GET http://production.s3.rubygems.org/latest_specs.4.8.gz 200 OK Exception `Errno::EEXIST' at /Users/blankyao/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/fileutils.rb:243 - File exists - /Users/blankyao/.gem/specs/rubygems.org%80 GET http://rubygems.org/specs.4.8.gz Exception `EOFError' at /Users/blankyao/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/net/protocol.rb:135 - end of file reached Exception `EOFError' at /Users/blankyao/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/net/protocol.rb:120 - end of file reached Exception `EOFError' at /Users/blankyao/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/net/http.rb:1060 - end of file reached connection reset after 2 requests, retrying GET http://rubygems.org/specs.4.8.gz Exception `EOFError' at /Users/blankyao/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/net/protocol.rb:135 - end of file reached 302 Found GET http://211.162.127.13/download/1436368/1520540/3/gz/93/23/1280600073565_279/specs.4.8.gz 200 OK Exception `Errno::EEXIST' at /Users/blankyao/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/fileutils.rb:243 - File exists - /Users/blankyao/.gem/specs/rubygems.org%80 Exception `Gem::DependencyError' at /Users/blankyao/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:153 - Unable to resolve dependencies: rails requires activesupport (= 2.2.3), activerecord (= 2.2.3), actionpack (= 2.2.3), actionmailer (= 2.2.3), activeresource (= 2.2.3) ERROR: While executing gem ... (Gem::DependencyError) Unable to resolve dependencies: rails requires activesupport (= 2.2.3), activerecord (= 2.2.3), actionpack (= 2.2.3), actionmailer (= 2.2.3), activeresource (= 2.2.3) /Users/blankyao/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:153:in `gather_dependencies' /Users/blankyao/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:267:in `install' /Users/blankyao/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:121:in `execute' /Users/blankyao/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:115:in `each' /Users/blankyao/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:115:in `execute' /Users/blankyao/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/command.rb:278:in `invoke' /Users/blankyao/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:147:in `process_args' /Users/blankyao/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:117:in `run' /Users/blankyao/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:65:in `run' /Users/blankyao/.rvm/rubies/ree-1.8.7-2011.03/bin/gem:21 |
10
daqing 2011-06-18 13:49:10 +08:00
你用的是rvm ree,要不要先试试1.8.7?
$ rvm install 1.8.7 $ rvm use 1.8.7 --default 然后在*新的shell*中安装rails: $ gem install rails -V |
11
real_newbie 2011-06-18 14:04:01 +08:00
试试1.9.2看看. 是不是装REE的时候用了sudo啊? 用了rvm, 就不要sudo了.
|