Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mongify does not work with Postgresql adapter #179

Open
nguyenhoangnhon opened this issue Sep 17, 2019 · 3 comments
Open

Mongify does not work with Postgresql adapter #179

nguyenhoangnhon opened this issue Sep 17, 2019 · 3 comments

Comments

@nguyenhoangnhon
Copy link

nguyenhoangnhon commented Sep 17, 2019

Hi guys, I am using Mongify to migrate data from PostgreSQL to Mongo DB. When I run command to check PostgreSQL connection , I get a following issue, please help me fix it .
My OS is Ubuntu18.04.

lab@lab:~/mongify$ mongify check database.config
Traceback (most recent call last):
22: from /usr/local/bin/mongify:23:in

' 21: from /usr/local/bin/mongify:23:inload'
20: from /var/lib/gems/2.5.0/gems/mongify-1.3.2/bin/mongify:17:in <top (required)>' 19: from /var/lib/gems/2.5.0/gems/mongify-1.3.2/lib/mongify/cli/application.rb:28:inexecute!'
18: from /var/lib/gems/2.5.0/gems/mongify-1.3.2/lib/mongify/cli/command/worker.rb:68:in execute' 17: from /var/lib/gems/2.5.0/gems/mongify-1.3.2/lib/mongify/cli/command/worker.rb:99:incheck_sql_connection'
16: from /var/lib/gems/2.5.0/gems/mongify-1.3.2/lib/mongify/database/sql_connection.rb:57:in has_connection?' 15: from /var/lib/gems/2.5.0/gems/activerecord-4.2.11.1/lib/active_record/connection_handling.rb:87:inconnection'
14: from /var/lib/gems/2.5.0/gems/activerecord-4.2.11.1/lib/active_record/connection_handling.rb:113:in retrieve_connection' 13: from /var/lib/gems/2.5.0/gems/activerecord-4.2.11.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:571:inretrieve_connection'
12: from /var/lib/gems/2.5.0/gems/activerecord-4.2.11.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:262:in connection' 11: from /usr/lib/ruby/2.5.0/monitor.rb:226:inmon_synchronize'
10: from /var/lib/gems/2.5.0/gems/activerecord-4.2.11.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:263:in block in connection' 9: from /var/lib/gems/2.5.0/gems/activerecord-4.2.11.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:348:incheckout'
8: from /usr/lib/ruby/2.5.0/monitor.rb:226:in mon_synchronize' 7: from /var/lib/gems/2.5.0/gems/activerecord-4.2.11.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:349:inblock in checkout'
6: from /var/lib/gems/2.5.0/gems/activerecord-4.2.11.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:422:in acquire_connection' 5: from /var/lib/gems/2.5.0/gems/activerecord-4.2.11.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:448:incheckout_new_connection'
4: from /var/lib/gems/2.5.0/gems/activerecord-4.2.11.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:438:in new_connection' 3: from /var/lib/gems/2.5.0/gems/activerecord-4.2.11.1/lib/active_record/connection_adapters/postgresql_adapter.rb:45:inpostgresql_connection'
2: from /var/lib/gems/2.5.0/gems/activerecord-4.2.11.1/lib/active_record/connection_adapters/postgresql_adapter.rb:45:in new' 1: from /var/lib/gems/2.5.0/gems/activerecord-4.2.11.1/lib/active_record/connection_adapters/postgresql_adapter.rb:243:ininitialize'
/var/lib/gems/2.5.0/gems/activerecord-_### 4.2.11.1/lib/active_record/connection_adapters/postgresql_adapter.rb:652:in `connect': uninitialized constant ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::PGconn (NameError)
_

@anlek
Copy link
Owner

anlek commented Sep 17, 2019

@nguyenhoangnhon. See if you can run gem install pg. I believe ActiveRecord uses that gem to make the connection.

@nguyenhoangnhon
Copy link
Author

Hi anlek,
I run command "gem install pg" but it isn't ok. I checked mongify with mysql2 , it worked fine with mysql2 but with postgesql i get that issue

@anlek
Copy link
Owner

anlek commented Sep 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants