Error while trying to run rubyrep scan for first time

204 views
Skip to first unread message

jacob...@googlemail.com

unread,
Jun 14, 2013, 10:18:07 AM6/14/13
to rub...@googlegroups.com
Hello List.

At first thanks for your work. I appreciate the work you people are doing with rubyrep. In my case i want to use rubyrep for my first time, to synchronizing two database. I followed the install instruction on the page http://www.rubyrep.org/installation.html. But when i try to do a first rubyrep scan, i always run into this error:

/var/lib/gems/1.8/gems/rubyrep-1.2.0/bin/rubyrep --verbose scan -c /home/mendt/conf/bh_rubyrep.conf
Exception caught: undefined method `error_field' for nil:NilClass
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1147:in `translate_exception'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract_adapter.rb:284:in `log'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:659:in `exec_query'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1256:in `select'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/database_statements.rb:18:in `select_all'
/var/lib/gems/1.8/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/query_cache.rb:63:in `select_all'
/var/lib/gems/1.8/gems/rubyrep-1.2.0/bin/../lib/rubyrep/connection_extenders/postgresql_extender.rb:103:in `tables'
/var/lib/gems/1.8/gems/rubyrep-1.2.0/bin/../lib/rubyrep/table_spec_resolver.rb:14:in `tables'
/var/lib/gems/1.8/gems/rubyrep-1.2.0/bin/../lib/rubyrep/table_spec_resolver.rb:91:in `expand_table_specs'
/var/lib/gems/1.8/gems/rubyrep-1.2.0/bin/../lib/rubyrep/table_spec_resolver.rb:83:in `each'
/var/lib/gems/1.8/gems/rubyrep-1.2.0/bin/../lib/rubyrep/table_spec_resolver.rb:83:in `expand_table_specs'
/var/lib/gems/1.8/gems/rubyrep-1.2.0/bin/../lib/rubyrep/table_spec_resolver.rb:58:in `resolve'
/var/lib/gems/1.8/gems/rubyrep-1.2.0/bin/../lib/rubyrep/session.rb:45:in `manual_primary_keys'
/var/lib/gems/1.8/gems/rubyrep-1.2.0/bin/../lib/rubyrep/session.rb:215:in `connect_database'
/var/lib/gems/1.8/gems/rubyrep-1.2.0/bin/../lib/rubyrep/session.rb:179:in `refresh_database_connection'
/var/lib/gems/1.8/gems/rubyrep-1.2.0/bin/../lib/rubyrep/session.rb:177:in `initialize'
/var/lib/gems/1.8/gems/rubyrep-1.2.0/bin/../lib/rubyrep/session.rb:177:in `new'
/var/lib/gems/1.8/gems/rubyrep-1.2.0/bin/../lib/rubyrep/session.rb:177:in `refresh_database_connection'
/var/lib/gems/1.8/gems/rubyrep-1.2.0/bin/../lib/rubyrep/session.rb:158:in `refresh'
/var/lib/gems/1.8/gems/rubyrep-1.2.0/bin/../lib/rubyrep/session.rb:158:in `each'
/var/lib/gems/1.8/gems/rubyrep-1.2.0/bin/../lib/rubyrep/session.rb:158:in `refresh'
/var/lib/gems/1.8/gems/rubyrep-1.2.0/bin/../lib/rubyrep/session.rb:227:in `initialize'
/var/lib/gems/1.8/gems/rubyrep-1.2.0/bin/../lib/rubyrep/base_runner.rb:151:in `new'
/var/lib/gems/1.8/gems/rubyrep-1.2.0/bin/../lib/rubyrep/base_runner.rb:151:in `session'
/var/lib/gems/1.8/gems/rubyrep-1.2.0/bin/../lib/rubyrep/base_runner.rb:166:in `execute'
/var/lib/gems/1.8/gems/rubyrep-1.2.0/bin/../lib/rubyrep/base_runner.rb:187:in `run'
/var/lib/gems/1.8/gems/rubyrep-1.2.0/bin/../lib/rubyrep/command_runner.rb:102:in `run'
/var/lib/gems/1.8/gems/rubyrep-1.2.0/bin/rubyrep:7

I already tried different ruby version (1.8 and 1.9.1) and also was trying jruby.

I am using PostgreSQL 8.4 and have on both database the same database schema. As OS i am using a debian 7 system. Hope you can help me.

Kind regards,

Jacob

Kevin Morwood

unread,
Nov 19, 2013, 8:34:25 AM11/19/13
to rub...@googlegroups.com
Jacob,

Did you solve this?

I'm running into the same problem.

Kevin

Henry Molina

unread,
Jul 28, 2014, 6:41:12 PM7/28/14
to rub...@googlegroups.com
Solved!

1. change:
gem 'activerecord', '>= 3.0.5'
to
gem 'activerecord', '= 3.0.5'

at:
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/rubyrep-1.2.0/lib/rubyrep.rb

2. gem install activerecord -v 3.0.5

Bye
Reply all
Reply to author
Forward
0 new messages