Problem with ibm db

42 views
Skip to first unread message

Henry Molina

unread,
Oct 17, 2012, 11:33:04 AM10/17/12
to activewareh...@googlegroups.com
Hi All,

I'm getting this error:
$ etl etl/process_all.ebf
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/activerecord-3.2.8/lib/active_record/dynamic_matchers.rb:50:in `method_missing': undefined method `ibm_db_connection' for #<Class:0x00000005658088> (NoMethodError)
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activewarehouse-etl-1.0.0/lib/etl/engine.rb:212:in `establish_connection'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activewarehouse-etl-1.0.0/lib/etl/engine.rb:143:in `connection'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activewarehouse-etl-1.0.0/lib/etl/control/source/database_source.rb:219:in `connection'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activewarehouse-etl-1.0.0/lib/etl/control/source/database_source.rb:213:in `query_rows'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activewarehouse-etl-1.0.0/lib/etl/control/source/database_source.rb:100:in `columns'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activewarehouse-etl-1.0.0/lib/etl/control/source/database_source.rb:160:in `block (2 levels) in write_local'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/csv.rb:1354:in `open'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activewarehouse-etl-1.0.0/lib/etl/control/source/database_source.rb:159:in `block in write_local'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activewarehouse-etl-1.0.0/lib/etl/control/source/database_source.rb:158:in `write_local'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activewarehouse-etl-1.0.0/lib/etl/control/source/database_source.rb:115:in `each'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activewarehouse-etl-1.0.0/lib/etl/engine.rb:333:in `each_with_index'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activewarehouse-etl-1.0.0/lib/etl/engine.rb:333:in `block in process_control'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activewarehouse-etl-1.0.0/lib/etl/engine.rb:327:in `each'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activewarehouse-etl-1.0.0/lib/etl/engine.rb:327:in `process_control'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activewarehouse-etl-1.0.0/lib/etl/engine.rb:275:in `process'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activewarehouse-etl-1.0.0/lib/etl/engine.rb:272:in `process'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activewarehouse-etl-1.0.0/lib/etl/batch/directives.rb:41:in `do_execute'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activewarehouse-etl-1.0.0/lib/etl/batch/directives.rb:15:in `execute'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activewarehouse-etl-1.0.0/lib/etl/batch/batch.rb:90:in `block in execute'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activewarehouse-etl-1.0.0/lib/etl/batch/batch.rb:89:in `each'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activewarehouse-etl-1.0.0/lib/etl/batch/batch.rb:89:in `execute'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activewarehouse-etl-1.0.0/lib/etl/engine.rb:300:in `process_batch'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activewarehouse-etl-1.0.0/lib/etl/engine.rb:276:in `process'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activewarehouse-etl-1.0.0/lib/etl/engine.rb:272:in `process'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activewarehouse-etl-1.0.0/lib/etl/engine.rb:55:in `process'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activewarehouse-etl-1.0.0/lib/etl/commands/etl.rb:82:in `block in execute'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activewarehouse-etl-1.0.0/lib/etl/commands/etl.rb:80:in `each'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activewarehouse-etl-1.0.0/lib/etl/commands/etl.rb:80:in `execute'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activewarehouse-etl-1.0.0/lib/etl/commands/etl.rb:90:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/activewarehouse-etl-1.0.0/bin/etl:28:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p194/bin/etl:19:in `load'
from /usr/local/rvm/gems/ruby-1.9.3-p194/bin/etl:19:in `<main>'
from /usr/local/rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval'
from /usr/local/rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `<main>'


I'm using activewarehouse-etl with the following setup:
$ bundle show
Gems included by the bundle:
  * activemodel (3.2.8)
  * activerecord (3.2.8)
  * activesupport (3.2.8)
  * activewarehouse-etl (1.0.0)
  * adapter_extensions (1.0.0)
  * arel (3.0.2)
  * awesome_print (1.0.2)
  * builder (3.0.4)
  * bundler (1.1.5)
  * diff-lcs (1.1.3)
  * fastercsv (1.5.5)
  * i18n (0.6.1)
  * ibm_db (2.5.10)
  * multi_json (1.3.6)
  * pg (0.14.0)
  * rake (0.9.2.2)
  * rspec (2.11.0)
  * rspec-core (2.11.1)
  * rspec-expectations (2.11.2)
  * rspec-mocks (2.11.2)
  * tzinfo (0.3.33)
$ ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]


However, the ibm_db gem is working already into irb, but not with activewarehouse-etl:
1.9.3p194 :001 > require 'ibm_db'
 => true 
1.9.3p194 :002 > require 'active_record'
 => true 
1.9.3p194 :003 > class Ventadc < ActiveRecord::Base
1.9.3p194 :004?>   end
 => nil 
1.9.3p194 :005 > ActiveRecord::Base.establish_connection(:adapter  => 'ibm_db', :database => 'db', :username => 'user', :password => 'pass', :host => 'localhost', :port => 50001, :schema => 'comreg')
 => #<ActiveRecord::ConnectionAdapters::ConnectionPool:0x00000006d4cd98 @mon_owner=nil, @mon_count=0, @mon_mutex=#<Mutex:0x00000006d4cc80>, @spec=#<ActiveRecord::Base::ConnectionSpecification:0x00000006cf32e8 @config={:adapter=>"ibm_db", :database=>"db", :username=>"user", :password=>"pass", :host=>"localhost", :port=>50001, :schema=>"comreg"}, @adapter_method="ibm_db_connection">, @reserved_connections={}, @queue=#<MonitorMixin::ConditionVariable:0x00000006d4cbb8 @monitor=#<ActiveRecord::ConnectionAdapters::ConnectionPool:0x00000006d4cd98 ...>, @cond=#<ConditionVariable:0x00000006d4cb90 @waiters=[], @waiters_mutex=#<Mutex:0x00000006d4cb18>>>, @timeout=5, @size=5, @connections=[], @automatic_reconnect=true> 
1.9.3p194 :006 > Ventadc.count
 => 1 
1.9.3p194 :007 > 


Any idea?

Your help will be greatly appreciated.

Andrew Kuklewicz

unread,
Oct 17, 2012, 12:46:38 PM10/17/12
to activewareh...@googlegroups.com
Can you provide the connection info for the db source that uses the ibm_db in the .ctl file that is called in the process_all.ebf?

Cheers,

Andrew Kuklewicz


--
You received this message because you are subscribed to the Google Groups "ActiveWarehouse Discuss" group.
To view this discussion on the web visit https://groups.google.com/d/msg/activewarehouse-discuss/-/Cfn5mPdlbDkJ.
To post to this group, send email to activewareh...@googlegroups.com.
To unsubscribe from this group, send email to activewarehouse-d...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/activewarehouse-discuss?hl=en.

Reply all
Reply to author
Forward
0 new messages