ActiveRecord oracle_enhanced适配器无法加载ruby-oci8库 [英] ActiveRecord oracle_enhanced adapter can't load ruby-oci8 library

查看:91
本文介绍了ActiveRecord oracle_enhanced适配器无法加载ruby-oci8库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

成功安装ruby-0ci8 gem和oracle_enhanced适配器gem后,尝试启动Rails项目服务器时出现以下错误:

After successfully installing the ruby-0ci8 gem and the oracle_enhanced adapter gem I get the following error when I try to fire up my rails project server:

=> Booting WEBrick
=> Rails 3.0.3 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/Library/Ruby/Gems/1.8/gems/activerecord-oracle_enhanced-adapter-1.3.2/lib/active_record/connection_adapters/oracle_enhanced_oci_connection.rb:7: 
ERROR: ActiveRecord oracle_enhanced adapter could not load ruby-oci8 library. 
Please install ruby-oci8 gem. (LoadError)

手持适配器和ruby-oci8宝石都显示在我的宝石列表中.两者都存在于我的Gemfile中.适配器为什么找不到oci8库?

Both the enhanded adapter and ruby-oci8 gem show up in my gem list. Both are present in my Gemfile. Why can't the adapter find the oci8 library?

我正在运行的一些设置规范:

Some specs on setup I'm running:

  • Mac雪豹(10.6.8)
  • Ruby 1.8.7(2009-06-12补丁程序级别174)[i686-darwin10.8.0]
  • 导轨3.0.3
  • ruby​​-oci8(2.0.4)[gem]
  • activerecord-oracle_enhanced-adapter(1.3.2)[gem]

我看了这篇文章: Rails 3.0.3- Oracle_enhanced不起作用.但这没有帮助.还有其他人碰到这个吗?

I've looked at this post: Rails 3.0.3 - Oracle_enhanced doesn't work. But it's not helping. Anyone else run into this?

=============================

==============================

我明白了.最后,我在/usr/local/oracle/instantclient_10_2/中存储了我的Oracle Instant Client文件的文件结构不正确.这就是导致所有问题的原因.基本上,我已经在第一个目录中嵌套了第二个Instantclient_10_2目录,并且我的.bash_profile在第一个目录中查找,而不是在其下一个目录中.

I got it figured out. In the end i had an incorrect file structure in /usr/local/oracle/instantclient_10_2/ where I had stored the files for my oracle instant client. That is what was causing all the issues. Basically I had nested a second instantclient_10_2 directory inside the first and I had my .bash_profile looking in the first directory and not the one below it.

推荐答案

运行sudo apt-get install libaio1

这篇关于ActiveRecord oracle_enhanced适配器无法加载ruby-oci8库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆