2011-08-17 309 views
0

我有我的Mac on Rails的環境中一些麻煩安裝我的紅寶石,我這個版本試圖超不匹配:在Mac OS類HTTP X

  • 紅寶石1.8.7(2011- 06-30 PATCHLEVEL 352)[i686的-darwin10.7.1]

  • 寶石1.8.6

  • 雪豹10.6.8

我認爲默認情況下XCode會安裝一些與我的一些寶石衝突的ruby庫。安裝Ruby我曾用 「RVM安裝1.8.7」

這是錯誤的堆棧跟蹤:

/Users/raimonbosch//.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/net/http.rb:278 
activesupport (3.0.3) lib/active_support/dependencies.rb:239:in `require' 
activesupport (3.0.3) lib/active_support/dependencies.rb:239:in `require' 
activesupport (3.0.3) lib/active_support/dependencies.rb:225:in `load_dependency' 
activesupport (3.0.3) lib/active_support/dependencies.rb:596:in `new_constants_in' 
activesupport (3.0.3) lib/active_support/dependencies.rb:225:in `load_dependency' 
activesupport (3.0.3) lib/active_support/dependencies.rb:239:in `require' 
/Users/raimonbosch//.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/net/https.rb:101 
activesupport (3.0.3) lib/active_support/dependencies.rb:239:in `require' 
activesupport (3.0.3) lib/active_support/dependencies.rb:239:in `require' 
activesupport (3.0.3) lib/active_support/dependencies.rb:225:in `load_dependency' 
activesupport (3.0.3) lib/active_support/dependencies.rb:596:in `new_constants_in' 
activesupport (3.0.3) lib/active_support/dependencies.rb:225:in `load_dependency' 
activesupport (3.0.3) lib/active_support/dependencies.rb:239:in `require' 
activesupport (3.0.3) lib/active_support/dependencies.rb:454:in `load' 
activesupport (3.0.3) lib/active_support/dependencies.rb:454:in `load_file' 
activesupport (3.0.3) lib/active_support/dependencies.rb:596:in `new_constants_in' 
activesupport (3.0.3) lib/active_support/dependencies.rb:453:in `load_file' 
activesupport (3.0.3) lib/active_support/dependencies.rb:340:in `require_or_load' 
activesupport (3.0.3) lib/active_support/dependencies.rb:491:in `load_missing_constant' 
activesupport (3.0.3) lib/active_support/dependencies.rb:183:in `const_missing' 
activesupport (3.0.3) lib/active_support/dependencies.rb:181:in `each' 
activesupport (3.0.3) lib/active_support/dependencies.rb:181:in `const_missing' 
activesupport (3.0.3) lib/active_support/inflector/methods.rb:113:in `constantize' 
activesupport (3.0.3) lib/active_support/inflector/methods.rb:112:in `each' 
activesupport (3.0.3) lib/active_support/inflector/methods.rb:112:in `constantize' 
activesupport (3.0.3) lib/active_support/dependencies.rb:528 
activesupport (3.0.3) lib/active_support/dependencies.rb:538:in `call' 
activesupport (3.0.3) lib/active_support/dependencies.rb:538:in `default' 
activesupport (3.0.3) lib/active_support/dependencies.rb:538:in `[]' 
activesupport (3.0.3) lib/active_support/dependencies.rb:538:in `get' 
actionpack (3.0.3) lib/action_dispatch/routing/route_set.rb:58:in `controller_reference' 
actionpack (3.0.3) lib/action_dispatch/routing/route_set.rb:44:in `controller' 
actionpack (3.0.3) lib/action_dispatch/routing/route_set.rb:23:in `call' 
rack-mount (0.6.14) lib/rack/mount/route_set.rb:148:in `call' 
rack-mount (0.6.14) lib/rack/mount/code_generation.rb:93:in `recognize' 
rack-mount (0.6.14) lib/rack/mount/code_generation.rb:68:in `optimized_each' 
rack-mount (0.6.14) lib/rack/mount/code_generation.rb:92:in `recognize' 
rack-mount (0.6.14) lib/rack/mount/route_set.rb:139:in `call' 
actionpack (3.0.3) lib/action_dispatch/routing/route_set.rb:492:in `call' 
actionpack (3.0.3) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call' 
actionpack (3.0.3) lib/action_dispatch/middleware/head.rb:14:in `call' 
rack (1.2.3) lib/rack/methodoverride.rb:24:in `call' 
actionpack (3.0.3) lib/action_dispatch/middleware/params_parser.rb:21:in `call' 
actionpack (3.0.3) lib/action_dispatch/middleware/flash.rb:182:in `call' 
actionpack (3.0.3) lib/action_dispatch/middleware/session/abstract_store.rb:149:in `call' 
actionpack (3.0.3) lib/action_dispatch/middleware/cookies.rb:295:in `call' 
activerecord (3.0.3) lib/active_record/query_cache.rb:32:in `call' 
activerecord (3.0.3) lib/active_record/connection_adapters/abstract/query_cache.rb:28:in `cache' 
activerecord (3.0.3) lib/active_record/query_cache.rb:12:in `cache' 
activerecord (3.0.3) lib/active_record/query_cache.rb:31:in `call' 
activerecord (3.0.3) lib/active_record/connection_adapters/abstract/connection_pool.rb:353:in `call' 
actionpack (3.0.3) lib/action_dispatch/middleware/callbacks.rb:46:in `call' 
activesupport (3.0.3) lib/active_support/callbacks.rb:415:in `_run_call_callbacks' 
actionpack (3.0.3) lib/action_dispatch/middleware/callbacks.rb:44:in `call' 
rack (1.2.3) lib/rack/sendfile.rb:107:in `call' 
actionpack (3.0.3) lib/action_dispatch/middleware/remote_ip.rb:48:in `call' 
actionpack (3.0.3) lib/action_dispatch/middleware/show_exceptions.rb:46:in `call' 
railties (3.0.3) lib/rails/rack/logger.rb:13:in `call' 
rack (1.2.3) lib/rack/runtime.rb:17:in `call' 
activesupport (3.0.3) lib/active_support/cache/strategy/local_cache.rb:72:in `call' 
rack (1.2.3) lib/rack/lock.rb:11:in `call' 
rack (1.2.3) lib/rack/lock.rb:11:in `synchronize' 
rack (1.2.3) lib/rack/lock.rb:11:in `call' 
actionpack (3.0.3) lib/action_dispatch/middleware/static.rb:30:in `call' 
railties (3.0.3) lib/rails/application.rb:168:in `call' 
railties (3.0.3) lib/rails/application.rb:77:in `send' 
railties (3.0.3) lib/rails/application.rb:77:in `method_missing' 
railties (3.0.3) lib/rails/rack/log_tailer.rb:14:in `call' 
rack (1.2.3) lib/rack/content_length.rb:13:in `call' 
rack (1.2.3) lib/rack/handler/webrick.rb:52:in `service' 
/Users/raimonbosch//.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' 
/Users/raimonbosch//.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' 
/Users/raimonbosch//.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' 
/Users/raimonbosch//.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/webrick/server.rb:162:in `start' 
/Users/raimonbosch//.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' 
/Users/raimonbosch//.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/webrick/server.rb:95:in `start' 
/Users/raimonbosch//.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/webrick/server.rb:92:in `each' 
/Users/raimonbosch//.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/webrick/server.rb:92:in `start' 
/Users/raimonbosch//.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/webrick/server.rb:23:in `start' 
/Users/raimonbosch//.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/webrick/server.rb:82:in `start' 
rack (1.2.3) lib/rack/handler/webrick.rb:13:in `run' 
rack (1.2.3) lib/rack/server.rb:217:in `start' 
railties (3.0.3) lib/rails/commands/server.rb:65:in `start' 
railties (3.0.3) lib/rails/commands.rb:30 
railties (3.0.3) lib/rails/commands.rb:27:in `tap' 
railties (3.0.3) lib/rails/commands.rb:27 
script/rails:6:in `require' 
script/rails:6 

由於提前,

雷蒙·博世。

+0

顯示Leopard 10.5不存在。它是雪豹(10.6)或豹(10.5)。 – Mischa

回答

0

在我們發現在倉庫中另一個類具有相同名稱的末尾:

cd $HOME/.rvm/gems 
find . -name *.rb | xargs grep 'class HTTP' 

然後,我們看到一個HTTP類的net.ssh-2.1.4

./ruby-1.8.7-p352/gems/net-ssh-2.1.4/lib/net/ssh/proxy/http.rb: class HTTP 

爲了解決問題,我們強制要求'net/http'並且在應用程序開始時要求'net/https'。如果應用需要默認的gems,首先需要net-ssh-2.1.4的HTTP類,然後我們不能使用Net:HTTP。