Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"undefined method `type_cast'" on active_record 4.2.0.beta1 #46

Open
skahlert opened this issue Sep 11, 2014 · 5 comments
Open

"undefined method `type_cast'" on active_record 4.2.0.beta1 #46

skahlert opened this issue Sep 11, 2014 · 5 comments

Comments

@skahlert
Copy link

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:
rails/rails@0b682e4

type_cast seems to be replaced by type_cast_for_database
simplified_type seems to be gone altogether...

@jtsaito
Copy link

jtsaito commented Nov 29, 2014

same here

@andreyantipov
Copy link

I have the same problem and working on a fix.

@contradictioned
Copy link

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'

@bruzos
Copy link

bruzos commented Nov 21, 2016

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'

@Hellfar
Copy link

Hellfar commented Mar 8, 2017

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants