logo       

oci8 problems: msg#00169

lang.ruby.mongrel.general

Subject: oci8 problems

I feel stupid having to ask this, but I haven't found an answer.  I installed ruby-oci8 in order to load data from an oracle db into postgres (part of a jsp to rails conversion).  In order to run my ruby script I know I need to set ORACLE_HOME and LD_LIBRARY_PATH environment variables to get it to work (and it does work).

I've tried setting ENV['ORACLE_HOME'] and ENV['LD_LIBRARY_PATH'] in config/envrironment.rb (before the Rails::Initializer.run do |config|  line), but this doesn't fix the issue.  I don't know where to set it so mongrel will pick it up.

By the way, I'm not even trying to use the oracle active record adapter with rails.  I just have oci8 installed for the migration script.

Please help.

Thanks in advance,
andy


The error in full from mongrel.log:

/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.1/lib/active_record/connection_adapters/oracle_adapter.rb:536: undefined method `define_a_column' for class `OCI8::Cursor' (NameError)
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
        from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:496:in `require'
        from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:343:in `new_constants_in'
        from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:496:in `require'
        from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.1/lib/active_record.rb:81
        from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.1/lib/active_record.rb:80
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
        from /usr/local/lib/ruby/gems/1.8/gems/rails- 1.2.1/lib/initializer.rb:162:in `require_frameworks'
         ... 10 levels...
        from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:83:in `run'
        from /usr/local/lib/ruby/gems/1.8/gems/mongrel- 1.0.1/lib/mongrel/command.rb:211:in `run'
        from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243
        from /usr/local/bin/mongrel_rails:16
/usr/local/lib/ruby/gems/1.8/gems/activerecord- 1.15.1/lib/active_record/connection_adapters/oracle_adapter.rb:536: undefined method `define_a_column' for class `OCI8::Cursor' (NameError)
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
        from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:496:in `require'
        from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:343:in `new_constants_in'
        from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:496:in `require'
        from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.1/lib/active_record.rb:81
        from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.15.1/lib/active_record.rb:80
        from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
        from /usr/local/lib/ruby/gems/1.8/gems/rails- 1.2.1/lib/initializer.rb:162:in `require_frameworks'
         ... 10 levels...
        from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:83:in `run'
        from /usr/local/lib/ruby/gems/1.8/gems/mongrel- 1.0.1/lib/mongrel/command.rb:211:in `run'
        from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243
        from /usr/local/bin/mongrel_rails:16
                                                                                            


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise