我正在尝试设置SQL Oracle并使用活动记录在rails上使用ruby迁移db。 我安装了sqldeveloper并创建了一个新连接。这是第一个错误:
I / O错误:网络Adapeter无法建立连接
然后我安装了instantclient basic,sdk,sqlplus,然后安装了两个gem:
gem 'ruby-oci8'
gem 'activerecord-oracle_enhanced-adapter'
但是我收到了这个错误:
LoadError:无法加载'active_record / connection_adapters / oracle_adapter'。确保config / database.yml中的适配器有效。如果您使用“mysql”,“mysql2”,“postgresql”或“sqlite3”以外的适配器,请将必要的适配器gem添加到Gemfile中。
这是我的database.yml:
# SQLite version 3.x
# gem install sqlite3
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
#
development:
adapter: oracle
database: development
username: nick
password:
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: oracle
database: test
username: nick
password:
production:
adapter: oracle
database: production
username: nick
password:
我无法找到解决方案,我该怎么办?
答案 0 :(得分:0)
更新adapter
条目如下:
adapter: oracle
至
adapter: oracle_enhanced