Mongify连接到SQL Server

时间:2018-11-01 08:54:46

标签: mongodb mongify

我想将数据从sql server移到mongodb。为此,我正在尝试进行mify。 当我尝试通过mongify连接到sql server时,它始终会出现以下错误:-

PS C:\> mongify check c:\mongify\database.config
Traceback (most recent call last):
        10: from C:/Ruby25-x64/bin/mongify:23:in `'
         9: from C:/Ruby25-x64/bin/mongify:23:in `load'
         8: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/mongify-1.3.2/bin/mongify:17:in `'
         7: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/mongify-1.3.2/lib/mongify/cli/application.rb:28:in `execute!'
         6: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/mongify-1.3.2/lib/mongify/cli/command/worker.rb:68:in `execute'
         5: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/mongify-1.3.2/lib/mongify/cli/command/worker.rb:99:in `check_sql_connection'
         4: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/mongify-1.3.2/lib/mongify/database/sql_connection.rb:56:in `has_connection?'
         3: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/mongify-1.3.2/lib/mongify/database/sql_connection.rb:40:in `setup_connection_adapter'
         2: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_handling.rb:50:in `establish_connection'
         1: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activerecord-4.2.10/lib/active_record/connection_adapters/connection_specification.rb:174:in `spec'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activerecord-4.2.10/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-sqlserver-adapter'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord). (Gem::LoadError)

我已经完成以下工作: 1.在Windows 10上安装带有devkit的RubyInstaller。(已成功安装) 2.通过powershell下载宝石“ activerecord-sqlserver-adapter”(gem insall activerecord-sqlserver-adapter)。这样安装就可以了,我可以在本地看到gem文件。 3.但是,当我尝试使用以下方法检查sql server连接时 “ mongify检查c:\ mongify \ database.config” 它给出以下错误- “为数据库适配器指定了'sqlserver',但未加载gem。将gem 'activerecord-sqlserver-adapter'添加到您的Gemfile中(并确保其版本处于ActiveRecord要求的最低要求。)(Gem :: LoadError)”。

我在网上进行了大量研究,每个人都说他们也遇到了相同的错误,但是没有人提供解决方案。

我可以帮忙吗?

0 个答案:

没有答案