anlek / mongify

Mongify allows you to map your data from a sql database and into a mongodb document database.
http://github.com/anlek/mongify
MIT License
317 stars 82 forks source link

connecting to the database(no_sql_connection) is not working #127

Open shu74 opened 7 years ago

shu74 commented 7 years ago

When i tried to check the connection. I always get this error.

SQL connection works /home/hduser/.rvm/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/mongify-1.3.1/lib/mongify/database/no_sql_connection.rb:82:in has_connection?': undefined methodconnected?' for # (NoMethodError) Did you mean? connection from /home/hduser/.rvm/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/mongify-1.3.1/lib/mongify/cli/command/worker.rb:104:in check_nosql_connection' from /home/hduser/.rvm/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/mongify-1.3.1/lib/mongify/cli/command/worker.rb:69:inexecute' from /home/hduser/.rvm/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/mongify-1.3.1/lib/mongify/cli/application.rb:28:in execute!' from /home/hduser/.rvm/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/mongify-1.3.1/bin/mongify:15:in<top (required)>' from /usr/bin/ruby/bin/mongify:22:in load' from /usr/bin/ruby/bin/mongify:22:in

' from /usr/bin/ruby/bin/ruby_executable_hooks:15:in eval' from /usr/bin/ruby/bin/ruby_executable_hooks:15:in
'

Can Someone please answer me quickly?

kamrankhatti commented 7 years ago

Whats your database.config file, could you share it?

shu74 commented 7 years ago

sql_connection do adapter "mysql2" host "127.0.0.1" username "root" password "toor" database "music" end

mongodb_connection do host "127.0.0.1" port "27017" database "music" end

shu74 commented 7 years ago

The connection finally works, but when i try to process it, it shows me this error.

/home/hduser/.rvm/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/mongify-1.3.1/lib/mongify/configuration.rb:14:in instance_eval': undefined methodtable' for # (NoMethodError) from /home/hduser/.rvm/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/mongify-1.3.1/lib/mongify/configuration.rb:14:in instance_eval' from /home/hduser/.rvm/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/mongify-1.3.1/lib/mongify/configuration.rb:14:inparse' from /home/hduser/.rvm/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/mongify-1.3.1/lib/mongify/cli/options.rb:78:in config_file' from /home/hduser/.rvm/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/mongify-1.3.1/lib/mongify/cli/options.rb:58:inparse' from /home/hduser/.rvm/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/mongify-1.3.1/lib/mongify/cli/application.rb:27:in execute!' from /home/hduser/.rvm/rubies/ruby-2.3.3/lib/ruby/gems/2.3.0/gems/mongify-1.3.1/bin/mongify:15:in<top (required)>' from /usr/bin/ruby/bin/mongify:22:in load' from /usr/bin/ruby/bin/mongify:22:in

' from /usr/bin/ruby/bin/ruby_executable_hooks:15:in eval' from /usr/bin/ruby/bin/ruby_executable_hooks:15:in
'

shu74 commented 7 years ago

my ruby version.

ruby 2.3.3p222 (2016-11-21 revision 56859) [armv7l-linux-eabih

shu74 commented 7 years ago

Thanks for your help.

Everything is fine

kamrankhatti commented 7 years ago

Sounds good.

Faizan227 commented 5 years ago

For SQL we also have to use the adpter of mysql?