Open firefli-uk opened 8 years ago
Same thing happened to me, googled a bit and found that this method was renamed in recent version of RoR. Not a ruby developer too ) All we can do is wait for maintainer to fix it in code.
I managed a quick fix to get it working.
The issue is that the gemspec asks for activerecord > 4.2, so 5.0.0 probably gets installed, which is incompatible with mongify atm.
I manually installed activerecord 4.2, then installed mongify: $ gem uninstall activerecord $ gem install activerecord --version '4.2' $ gem install mongify
@GrahamW Thanks ! Thought about it myself, but was too lazy to google it ) Your solution is working.
But it will be great if maintainer will fix it for 5.0.0 which installs "by default".
Thanks @GrahamW and @Rikcon for pointing me in the right direction. It seems to be rather fussy with dependencies at the moment.
I followed @GrahamW instructions but then needed to install an older version of mysql2 gem to get it to work properly. I tried setting the adaptor in the config file back to 'mysql' didn't fix it immediately for me.
$ gem install mysql2 --version '0.3.18'
Thanks guys.
Hi There, thanks for all your efforts with this project, will save me a ton of time migrating. ;) ... I'm struggling with an error. I'm not a ruby user so would appreciate some help figuring it out seems like something is missing.
/usr/local/lib/ruby/gems/2.2.0/gems/mongify-1.3.0/lib/mongify/database/column.rb:249:in
type_cast': undefined methodtype_cast_from_database' for #<ActiveRecord::Type::DateTime:0x007f95f46b1188> (NoMethodError)
I'm going from MySql to MongoDB. It appears to be any time the translation comes across a date field it doesn't know what to do with it. In Mysql the format is set to "Date" and then
ruby -v ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin15]
Here's my gem list: activemodel (5.0.0) activerecord (5.0.0) activerecord-mysql2-adapter (0.0.3) activesupport (5.0.0) arel (7.0.0) bigdecimal (1.2.6) bson (1.12.5) bson_ext (1.12.5) concurrent-ruby (1.0.2) highline (1.7.8) i18n (0.7.0) io-console (0.4.3) json (1.8.1) minitest (5.4.3) mongify (1.3.0) mongo (1.12.5) mysql2 (0.4.4) power_assert (0.2.2) psych (2.0.8) rake (10.4.2) rdoc (4.2.0) test-unit (3.0.8) thread_safe (0.3.5) tzinfo (1.2.2)
Config file