1

我有一个关于 RadRails 和activerecord-oracle_enhanced-adapter. 我正在使用 RadRails 2。下面是我的本地 gem 列表,从 gem list –local 命令的输出中获得:

*** LOCAL GEMS ***

actionmailer (2.3.4)
actionpack (2.3.4)
activerecord (2.3.4)
activerecord-oracle_enhanced-adapter (1.6.7)
activeresource (2.3.4)
activesupport (2.3.4)
bigdecimal (1.2.6)
io-console (0.4.3)
json (1.8.1)
oracle_enhanced (1.2.5)
psych (2.0.8)
rack (1.0.1)
rails (2.3.4)
rake (10.4.2)
rdoc (4.2.0)

但是,当我尝试运行 rake migrate 命令时,会出现以下内容:

rake aborted!
Please install the oracle_enhanced adapter: `gem install activerecord-oracle_enhanced-adapter` (no such file to load -- active_record/connection_adapters/oracle_enhanced_adapter)

(See full trace by running task with --trace)

我已经卸载activerecord-oracle_enhanced-adapter并重新安装了它,重新启动了 RadRails,但都无济于事。

4

1 回答 1

0

问题是您使用 rails 2.3.4(最后一次更新于 2010 年)和几周前发布的最新的 activerecord oracle 增强适配器 1.6.7。

尝试将您的 rails 更新到 4.1(它还需要将 ruby​​ 更新到 2.3)或在 Gemfile 中将 activerecord-oracle_enhanced-adapter 降级到 1.3.2:

gem 'activerecord-oracle_enhanced-adapter', '~> 1.3', '>= 1.3.2'

此外,最好不要使用这么旧的 RadRails。在任何现代编辑器或 IDE 中尝试最新的 ruby​​ 和 rails!

于 2016-04-21T16:49:53.433 回答