2012-10-10 2 views
0

ROR 3.2에서 Oracle 데이터베이스로 연결하는 데 문제가 있습니다. 레일 오라클 고급 어댑터

irb(main):001:0> gem 'ruby-oci8', "~>2.1.0" 
=> true 
irb(main):002:0> gem 'activerecord-oracle_enhanced-adapter', '~> 1.4.1' 
=> true 
irb(main):003:0> exit 

rails console 
C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require': 
Please install the oracle_enhanced adapter: `gem install activerecord-o 
racle_enhanced-adapter` (cannot load such file -- active_record/connection_adapters/oracle_enhanced_adapter) (LoadError) 

나는 웹을 검색하고 내가 https://github.com/rsim/oracle-enhanced/blob/master/Gemfile에 위치한 보석 파일을 작성해야하고 번들이 설치합니까 말한다. 하지만 난 레일에 새로운 오전이 어떤 아이디어를하시기 바랍니다 어떻게 해야할지 모르겠다.

은 C : \ kerbapp> 번들 쇼 액티브 - oracle_enhanced 어댑터 C : /Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-oracle_enhanced-adapter-1.4.1

답변

1

A는 애플리케이션 레일 3.0이 bundler라고 불리는 보석을위한 패키지 관리와 통합되기 때문에 (나는 reading up more here을 추천한다). 모든 응용 프로그램은 패키지 목록에 포함 된 보석 만 볼 수 있습니다.

프로젝트에 Gemfile 파일이 있어야합니다. gem 'activerecord-oracle_enhanced-adapter', '~> 1.4.1' 줄을 추가하고 프로젝트 루트 디렉토리에서 bundle 명령을 실행하면 도움이됩니다.

레일 (그리고 상당한 크기의 루비 프로젝트)로 작업 할 때 모든 보석을 이런 식으로 추가해야한다는 것을 명심하십시오.