Open arthurvaverko-kaltura opened 4 years ago
Hello @arthurvaverko, this is because Rails 4.2 will not run on Ruby 2.7. Try downgrading your ruby version to 2.4
.
More details...
Let me know if you still have issues
thansk .. im kinda new to ruby ..
so i moved to using a docker file .. created this ...
FROM ruby:2.4
LABEL MAINTAINER="Arthur Vaverk <ArthurVaverko@gmail.com>"
RUN gem install activerecord -v 4.2 && \
gem install activesupport -v 4.2 && \
gem install bson -v 1.10.2 && \
gem install bson_ext -v 1.10.2 && \
gem install highline -v 1.6.1 && \
gem install mongo -v 1.10.2 && \
gem install mysql2 -v 0.3.21 && \
gem install mongify -v 1.3.0 && \
gem install mongify-mongoid -v 1.0.4
RUN apt update && apt install wget && \
apt install build-essential && \
apt install libc6-dev
RUN gem install tiny_tds -v 0.7.0
RUN mkdir -p /mongify
WORKDIR /mongify
CMD ["mongify", "-h"]
and my database.config file is
sql_connection do
adapter "tiny_tds"
host "10.10.10.10"
username "sa"
password "password"
database "Users"
end
mongodb_connection do
host "localhost"
database "Users"
end
I'm trying to use tiny_tds to get data form MS Sql Server..
and i run the dockerfile like this
docker run --rm --network host -v c:\code\mongify:/mongify/ -it mongify mongify check database.config
and getting a new error
C:\code\mongify>docker run --rm --network host -v C:\Code\mongify:/mongify/ -it mongify mongify check database.config
/usr/local/bundle/gems/activesupport-4.2.0/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Fixnum is deprecated
/usr/local/bundle/gems/activesupport-4.2.0/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Bignum is deprecated
/usr/local/bundle/gems/activesupport-4.2.0/lib/active_support/core_ext/numeric/conversions.rb:124:in `block (2 levels) in <class:Numeric>': stack level too deep (SystemStackError)
from /usr/local/bundle/gems/activesupport-4.2.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
from /usr/local/bundle/gems/activesupport-4.2.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
from /usr/local/bundle/gems/activesupport-4.2.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
from /usr/local/bundle/gems/activesupport-4.2.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
from /usr/local/bundle/gems/activesupport-4.2.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
from /usr/local/bundle/gems/activesupport-4.2.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
from /usr/local/bundle/gems/activesupport-4.2.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
from /usr/local/bundle/gems/activesupport-4.2.0/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
... 4442 levels...
from /usr/local/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/bundle/gems/mongify-1.3.0/bin/mongify:10:in `<top (required)>'
from /usr/local/bundle/bin/mongify:23:in `load'
from /usr/local/bundle/bin/mongify:23:in `<main>'
Try rolling the Ruby version back a bit more. Maybe 2.2?
I'll run your docker setup when I get some time to check it out.
after rolling too 2.2 im getting this
root@docker-desktop:/mongify# mongify check database.config
/usr/local/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:59:in `require': Could not load 'active_record/connection_adapters/tiny_tds_adapter'. Make sure that the adapter in config/database.yml is valid. If you use an adapter other than 'mysql', 'mysql2', 'postgresql' or 'sqlite3' add the necessary adapter gem to the Gemfile. (LoadError)
from /usr/local/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:59:in `require'
from /usr/local/bundle/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
from /usr/local/bundle/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
from /usr/local/bundle/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
from /usr/local/bundle/gems/activerecord-4.2.0/lib/active_record/connection_adapters/connection_specification.rb:175:in `spec'
from /usr/local/bundle/gems/activerecord-4.2.0/lib/active_record/connection_handling.rb:50:in `establish_connection'
from /usr/local/bundle/gems/mongify-1.3.0/lib/mongify/database/sql_connection.rb:40:in `setup_connection_adapter'
from /usr/local/bundle/gems/mongify-1.3.0/lib/mongify/database/sql_connection.rb:56:in `has_connection?'
from /usr/local/bundle/gems/mongify-1.3.0/lib/mongify/cli/command/worker.rb:95:in `check_sql_connection'
from /usr/local/bundle/gems/mongify-1.3.0/lib/mongify/cli/command/worker.rb:64:in `execute'
from /usr/local/bundle/gems/mongify-1.3.0/lib/mongify/cli/application.rb:28:in `execute!'
from /usr/local/bundle/gems/mongify-1.3.0/bin/mongify:15:in `<top (required)>'
from /usr/local/bundle/bin/mongify:23:in `load'
from /usr/local/bundle/bin/mongify:23:in `<main>'
if tiny_tds is not supported any way to migrate from ms sql server to mongo using this tool ?
Your error now is related to using tiny_tds. I believe you have to install the following gems (inside your container):
gem install tiny_tds
gem install activerecord-sqlserver-adapter
More details are available here: https://github.com/rails-sqlserver/activerecord-sqlserver-adapter
I'm trying to run
mongify check database.config
and getting this: