我做了所有的安裝,也許不知道是否仍然缺少一些東西。ActiveRecord + Oracle連接問題
我想要Rails和Oracle。我所做的是從RubyForge安裝oci8
。然後是ActiveRecord增強版的Oracle。當我確實去rake db:create
它更改爲安裝活動記錄oracle增強版本。我再次(gem install
)和運行rake db:create
但又得到同樣的錯誤。不知道,可能是什麼修復。
============================================== ========================
以下是database.yml的
development:
adapter: oracle_enhanced
database: //localhost:1521/dba
username: re*********
password: ********
對於活動記錄安裝映像,以下是結果集
E:\railstest\script>gem install activerecord-oracle_enhanced-adapter
WARNING: Error fetching data: SocketError: getaddrinfo: The storage control bl
cks were destroyed. (http://rubygems.org/latest_specs.4.8.gz)
Successfully installed activerecord-oracle_enhanced-adapter-1.4.1
1 gem installed
Installing ri documentation for activerecord-oracle_enhanced-adapter-1.4.1...
Installing RDoc documentation for activerecord-oracle_enhanced-adapter-1.4.1...
當執行本地主機:3000 /問候/你好
這是錯誤的ActiveRecord的完整的跟蹤:: ConnectionNotEstablished
activerecord (3.2.3) lib/active_record/connection_adapters/abstract/connection_pool.rb:398:in `retrieve_connection'
activerecord (3.2.3) lib/active_record/connection_adapters/abstract/connection_specification.rb:168:in `retrieve_connection'
activerecord (3.2.3) lib/active_record/connection_adapters/abstract/connection_specification.rb:142:in `connection'
activerecord (3.2.3) lib/active_record/query_cache.rb:67:in `call'
activerecord (3.2.3) lib/active_record/connection_adapters/abstract/connection_pool.rb:467:in `call'
actionpack (3.2.3) lib/action_dispatch/middleware/callbacks.rb:28:in `call'
activesupport (3.2.3) lib/active_support/callbacks.rb:405:in `_run__31549393__call__4__callbacks'
activesupport (3.2.3) lib/active_support/callbacks.rb:405:in `send'
activesupport (3.2.3) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.3) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
activesupport (3.2.3) lib/active_support/callbacks.rb:81:in `send'
activesupport (3.2.3) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.3) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (3.2.3) lib/action_dispatch/middleware/reloader.rb:65:in `call'
actionpack (3.2.3) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
actionpack (3.2.3) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
actionpack (3.2.3) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
railties (3.2.3) lib/rails/rack/logger.rb:26:in `call_app'
railties (3.2.3) lib/rails/rack/logger.rb:16:in `call'
actionpack (3.2.3) lib/action_dispatch/middleware/request_id.rb:22:in `call'
rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'
rack (1.4.1) lib/rack/runtime.rb:17:in `call'
activesupport (3.2.3) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.4.1) lib/rack/lock.rb:15:in `call'
actionpack (3.2.3) lib/action_dispatch/middleware/static.rb:62:in `call'
railties (3.2.3) lib/rails/engine.rb:479:in `call'
railties (3.2.3) lib/rails/application.rb:220:in `call'
rack (1.4.1) lib/rack/content_length.rb:14:in `call'
railties (3.2.3) lib/rails/rack/log_tailer.rb:14:in `call'
rack (1.4.1) lib/rack/handler/webrick.rb:59:in `service'
E:/Ruby187/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
E:/Ruby187/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
E:/Ruby187/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
E:/Ruby187/lib/ruby/1.8/webrick/server.rb:162:in `start'
E:/Ruby187/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
E:/Ruby187/lib/ruby/1.8/webrick/server.rb:95:in `start'
E:/Ruby187/lib/ruby/1.8/webrick/server.rb:92:in `each'
E:/Ruby187/lib/ruby/1.8/webrick/server.rb:92:in `start'
E:/Ruby187/lib/ruby/1.8/webrick/server.rb:23:in `start'
E:/Ruby187/lib/ruby/1.8/webrick/server.rb:82:in `start'
rack (1.4.1) lib/rack/handler/webrick.rb:13:in `run'
rack (1.4.1) lib/rack/server.rb:265:in `start'
railties (3.2.3) lib/rails/commands/server.rb:70:in `start'
railties (3.2.3) lib/rails/commands.rb:55
railties (3.2.3) lib/rails/commands.rb:50:in `tap'
railties (3.2.3) lib/rails/commands.rb:50
script/rails:6:in `require'
script/rails:6