Closed ganesh3 closed 5 years ago
Got the above issue resolved by installing active record for sql sever as : 'gem install activerecord-sqlserver-adapter'
Now I am getting another error:
mongify check database.config
Traceback (most recent call last):
10: from D:/Ruby25/bin/mongify:23:in <main>' 9: from D:/Ruby25/bin/mongify:23:in
load'
8: from D:/Ruby25/lib/ruby/gems/2.5.0/gems/mongify-1.3.2/bin/mongify:17:in <top (required)>' 7: from D:/Ruby25/lib/ruby/gems/2.5.0/gems/mongify-1.3.2/lib/mongify/cli/application.rb:28:in
execute!'
6: from D:/Ruby25/lib/ruby/gems/2.5.0/gems/mongify-1.3.2/lib/mongify/cli/command/worker.rb:68:in execute' 5: from D:/Ruby25/lib/ruby/gems/2.5.0/gems/mongify-1.3.2/lib/mongify/cli/command/worker.rb:99:in
check_sql_connection'
4: from D:/Ruby25/lib/ruby/gems/2.5.0/gems/mongify-1.3.2/lib/mongify/database/sql_connection.rb:56:in has_connection?' 3: from D:/Ruby25/lib/ruby/gems/2.5.0/gems/mongify-1.3.2/lib/mongify/database/sql_connection.rb:40:in
setup_connection_adapter'
2: from D:/Ruby25/lib/ruby/gems/2.5.0/gems/activerecord-4.2.11/lib/active_record/connection_handling.rb:50:in establish_connection' 1: from D:/Ruby25/lib/ruby/gems/2.5.0/gems/activerecord-4.2.11/lib/active_record/connection_adapters/connection_specification.rb:174:in
spec'
D:/Ruby25/lib/ruby/gems/2.5.0/gems/activerecord-4.2.11/lib/active_record/connection_adapters/connection_specification.rb:177:in rescue in spec': Specified 'sqlserver' for database adapter, but the gem is not loaded. Add
gem 'activerecord-jdbc-adapter'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord). (Gem::LoadError)
Installed 'activerecord-jdbc-adapter' successfully but I am still getting the above error. Please help.
Reverted Ruby to 2.2.6 version and used adapter as 'sqlite3' which helped and the connections worked.
Hi Andrew,
I am getting an error for specifying the Adapater as 'sqlserver'. Is SQL Server not supported? If it is, please let me know what should be the adapter name.
database.config file & error details below (most details masked for obvious reasons):
sql_connection do adapter "sqlserver" host "..." username "*" password "***" database "**" batch_size 10000 # This is defaulted to 10000 but in case you want to make that smaller (on lower RAM machines)
Uncomment the following line if you get a "String not valid UTF-8" error.
encoding "utf8"
end
mongodb_connection do host "**" database "***"
Uncomment the following line if you get a "String not valid UTF-8" error.
encoding "utf8"
end