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

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

Open
shu74 opened this issue Dec 14, 2016 · 7 comments
Open

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

shu74 opened this issue Dec 14, 2016 · 7 comments

Comments

@shu74
Copy link

shu74 commented Dec 14, 2016

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 method connected?' for #Mongo::DB:0x205fbc0 (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:in execute'
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
Copy link

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

@shu74
Copy link
Author

shu74 commented Dec 14, 2016

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
Copy link
Author

shu74 commented Dec 14, 2016

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 method table' for #Mongify::Configuration:0x1804cf8 (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:in parse'
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:in parse'
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
Copy link
Author

shu74 commented Dec 14, 2016

my ruby version.

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

@shu74
Copy link
Author

shu74 commented Dec 14, 2016

Thanks for your help.

Everything is fine

@kamrankhatti
Copy link

Sounds good.

@Faizan227
Copy link

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

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

3 participants