activeuuid
activeuuid copied to clipboard
"undefined method `type_cast'" on active_record 4.2.0.beta1
activeuuid raises follwing error on inclusion:
NameError: undefined method``type_cast' for class``ActiveRecord::ConnectionAdapters::Column'
The offending line seems to be activeuuid-0.5.0/lib/activeuuid/patches.rb:36
From what I figured out, the api was changed completely in the Column class: Amongst this and other commits: https://github.com/rails/rails/commit/0b682e4b05c8f58c77c655650af6638c483ac903
type_cast seems to be replaced by type_cast_for_database
simplified_type seems to be gone altogether...
same here
~~I have the same problem and working on a fix.~~
FYI (as mentioned in the referencing issue): This can be solved atm by pulling the master brach into your Gemfile like
gem 'activeuuid', git: 'https://github.com/jashmenn/activeuuid.git'
Rails 5.0.0.1 Sqlite as development storage activeuuid 0.6.1 (at master@4f8e0ef)
Keep showing error Gem Load Error is: undefined method type_cast' for classActiveRecord::ConnectionAdapters::Column'
Rails 5.0.2 Sqlite activeuuid (0.6.1) Blank project with one alone model (was following the tutorial here)
Same error here at migrating my migrations:
DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from block in <module:Column> at /home/username/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/activeuuid-4f8e0efbd459/lib/activeuuid/patches.rb:66)
rake aborted!
Bundler::GemRequireError: There was an error while trying to load the gem 'activeuuid'.
Gem Load Error is: undefined method `type_cast' for class `ActiveRecord::ConnectionAdapters::Column'
Backtrace for gem load error is:
/home/username/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/core_ext/module/aliasing.rb:37:in `alias_method'
/home/username/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/core_ext/module/aliasing.rb:37:in `alias_method_chain'
...
Could I be of any help ?