Problems using Oracle with Rails -
Then, after various tutorials, I installed the following gems on my Windows box:
"Active-Records-Oracle_Enchanted-Adapter"
and
"Ruby-OC8"
Modify your database to see IMML:
oracle_development: adapter: oracle_enhanced database: 127.0.0.0.1121 / sd username: uid password: pid
Ruby OCI 8 compiled (The tutorial on this: [Rail wiki] [1] is contained, this may be the case, and it is suggested to use version 1.0.4 instead). Therefore, 1.0.4 is compiled and installed properly, but once I have it (and loading the OCI DLL in Ruby), I run a quick test from the Rail Console and see:
Loading development environment (Rail 2.3.5)
OracleConnector.test RuntimeError: Please install the oracle_enhanced adapter:
GEM Active-Ork- Install oracle_enhanced-adapter
(Error: Ruby-oci8 version 1.0.7 is too old. Please refer to Ruby-oci8 version 2.0.3 or above Install later versions.)
I'm not really sure to. For one, I'm definitely "activerecord-oracle_enhanced-adapter", and I'm not sure why it thinks other intelligent. For two, I do not know how to get a new copy of OCI 8 ... When I try, I think:
C: \ documents and settings \ jschultz \ Workspace \ OracleTest & gt; Install Gem Install Ruby-oci8 Basic Extensions Buildings may take a while ... Error: Error installing Ruby-oci8: Error: Mani failed to create native extension C: /Ruby/bin/ruby.exe The extconf.rb is checking for the load library path ... Path ... Checking C: \ Ruby \ bin ... Yes C: /Ruby/bin/oci.dll A Customer looks like perfect Check for cc ... *** extconf.rb failed *** Could not make Makefile due to some reason, maybe there is a lack of necessary libraries and / or headers Check the mkmf.log file for more information. You may need configuration options. Available configuration options: - Including opt-dials - Including - without-opt-in-opt-in - without-opt-in = $ {opt-dir} / include --with-opt-lib - Without-opt-lib = $ {opt-dir} / lib - side-by-face --srcdir = --curdir --ruby = C: / ruby / bin / rabbi --with-instant-client - without- instant-client ./oraconf.rbitter62: IN`check_cc ': RuntimeAir (runtime) ./rac .rb: 54 9: In 'init' ./oracf.rb:680:IN from 'Start'. / Oraconf.rb: 345: From 'new'. / Oraconf.rb: 345: `Received 'from extconf .rb: 18 ng --------------------------------- ------------ ------ Error Message: The C compiler does not work properly. Backtas: ./oracon.rb/126 :: 'Czech_mc' ./oraconf.rb.01/49: 'init' ./oracf.rb:680:IN 'Start' ./oraconf.rb:345: 'New './orac.rb:345:' get 'extconf.rb: 18 --------------------------------- ------------------ View: * http://ruby-oci8.rubyforge.org/en/HowToInstall.html * http://ruby-oci8.rubyforge.org /en/ReportInstallProblem.html [1]: http://wiki.rubyonrails.org/database-support/oracle
And I do not know what to do about it ...
To begin with, you should use the correct Ruby version from Rubyinstaller.org to version 1.8.7 or 1.9 Use 1. Then make sure to install the development kit.
Once you have that, you can run only the gem-installed Ruby-oci8
and it will work. The development kit has given permission to build a native build.
Comments
Post a Comment