Closed ramananswaminathan closed 6 years ago
The error is based on ActiveRecord 5.1 requiring migration version (which mongify doesn't provide at the moment). Try uninstalling activerecord
and activemodel
version 5.1 by running gem uninstall activerecord
and so on.
Thanks a lot for your prompt response. Mongify working now!.
Hi,
when i issue mongify command, i get this error
Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for: (StandardError)
my gem env
RubyGems ### Environment:
$ gem list
LOCAL GEMS
actionpack (4.2.9) actionview (4.2.9) activemodel (5.1.5, 5.0.6, 4.2.10) activerecord (5.1.5, 5.0.6, 4.2.10) activerecord-oracle_enhanced-adapter (1.8.2) activesupport (5.1.5, 5.0.6, 4.2.10, 4.2.9) arel (9.0.0, 8.0.0, 7.1.4, 6.0.4) atomic (1.1.100, 1.1.16) bigdecimal (1.3.4, 1.2.8) blankslate (3.1.3) bson (4.3.0, 1.12.5) bson_ext (1.12.5) builder (3.2.3, 3.2.2) bundler (1.15.1) concurrent-ruby (1.0.5) crass (1.0.3) did_you_mean (1.0.0) erubi (1.7.1) erubis (2.7.0) highline (1.7.10, 1.7.8) i18n (1.0.0, 0.9.5, 0.7.0) io-console (0.4.6, 0.4.5) json (2.1.0, 1.8.3) loofah (2.2.0, 2.0.3) method_source (0.9.0) mini_portile2 (2.3.0) minitest (5.11.3, 5.10.3) molinillo (0.5.0) mongify (1.3.1) mongo (2.5.1, 1.12.5) net-http-persistent (2.9.4) net-telnet (0.1.1) nokogiri (1.8.0) pkg-config (1.2.9, 1.2.7) power_assert (1.1.1, 0.2.7) psych (3.0.2, 2.1.0) rack (2.0.4, 1.6.4) rack-test (0.8.3, 0.6.3) rails-deprecated_sanitizer (1.0.3) rails-dom-testing (2.0.3, 1.0.6) rails-html-sanitizer (1.0.3) railties (5.1.5, 4.2.9) rake (12.3.0, 12.0.0) rdoc (6.0.1, 4.2.1) ruby-plsql (0.6.0) test-unit (3.2.7, 3.2.5) thor (0.20.0, 0.19.4) thread_safe (0.3.6, 0.3.5) tzinfo (1.2.5, 1.2.2)
Database config file
cat database.config sql_connection do adapter "oracle_enhanced" host "9.126.49.118" username "oracle2mongo" password "ora123#" database "ORCL1" end
mongodb_connection do host "localhost" database "sw" end
Error:
$ mongify check database.config /var/lib/gems/2.3.0/gems/activerecord-5.1.5/lib/active_record/migration.rb:525:in `inherited': Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for: (StandardError)
class Mongify::Translation::Sync::SyncHelperMigrator < ActiveRecord::Migration[4.2] from /var/lib/gems/2.3.0/gems/mongify-1.3.1/lib/mongify/translation/sync.rb:13:in'
from /var/lib/gems/2.3.0/gems/mongify-1.3.1/lib/mongify/translation/sync.rb:3:in
<module:Sync>' from /var/lib/gems/2.3.0/gems/mongify-1.3.1/lib/mongify/translation/sync.rb:8:in
<module:Mongify>' from /var/lib/gems/2.3.0/gems/mongify-1.3.1/lib/mongify/translation/sync.rb:2:in
<top (required)>' from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:inrequire' from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:in
require' from /var/lib/gems/2.3.0/gems/mongify-1.3.1/lib/mongify/translation.rb:3:in<top (required)>' from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:in
require' from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:inrequire' from /var/lib/gems/2.3.0/gems/mongify-1.3.1/lib/mongify.rb:13:in
<top (required)>' from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'Can you please help?