-
Notifications
You must be signed in to change notification settings - Fork 106
undefined method simplified_type for class ActiveRecord::ConnectionAdapters::PostgreSQLColumn #133
Comments
@sawantprasann you should be able to use hstore without this gem since Rails 4. |
I have the same issue:
The issue appears when run: $ rails g hstore:setup Output: /home/vagrant/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.1/lib/active_support/core_ext/module/aliasing.rb:37:in `alias_method': undefined method `simplified_type' for class `ActiveRecord::ConnectionAdapters::PostgreSQLColumn' (NameError)
from /home/vagrant/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.1/lib/active_support/core_ext/module/aliasing.rb:37:in `alias_method_chain'
from /home/vagrant/.rvm/gems/ruby-2.3.1/gems/activerecord-postgres-hstore-0.7.8/lib/activerecord-postgres-hstore/activerecord.rb:80:in `<class:PostgreSQLColumn>'
from /home/vagrant/.rvm/gems/ruby-2.3.1/gems/activerecord-postgres-hstore-0.7.8/lib/activerecord-postgres-hstore/activerecord.rb:74:in `<module:ConnectionAdapters>'
from /home/vagrant/.rvm/gems/ruby-2.3.1/gems/activerecord-postgres-hstore-0.7.8/lib/activerecord-postgres-hstore/activerecord.rb:70:in `<module:ActiveRecord>'
from /home/vagrant/.rvm/gems/ruby-2.3.1/gems/activerecord-postgres-hstore-0.7.8/lib/activerecord-postgres-hstore/activerecord.rb:2:in `<top (required)>'
from /home/vagrant/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
from /home/vagrant/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `block in require'
from /home/vagrant/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
from /home/vagrant/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
from /home/vagrant/.rvm/gems/ruby-2.3.1/gems/activerecord-postgres-hstore-0.7.8/lib/activerecord-postgres-hstore/railties.rb:18:in `block (2 levels) in <class:Hstore>'
from /home/vagrant/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
from /home/vagrant/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
from /home/vagrant/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
from /home/vagrant/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:44:in `each'
from /home/vagrant/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.1/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
from /home/vagrant/.rvm/gems/ruby-2.3.1/gems/activerecord-5.0.0.1/lib/active_record/base.rb:324:in `<module:ActiveRecord>'
from /home/vagrant/.rvm/gems/ruby-2.3.1/gems/activerecord-5.0.0.1/lib/active_record/base.rb:24:in `<top (required)>'
from /home/vagrant/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
from /home/vagrant/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `block in require'
from /home/vagrant/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
from /home/vagrant/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.1/lib/active_support/dependencies.rb:293:in `require'
from /home/vagrant/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/application.rb:345:in `active_record_configured?'
from /home/vagrant/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/application.rb:263:in `disconnect_database'
from /home/vagrant/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/application.rb:97:in `preload'
from /home/vagrant/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/application.rb:143:in `serve'
from /home/vagrant/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/application.rb:131:in `block in run'
from /home/vagrant/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/application.rb:125:in `loop'
from /home/vagrant/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/application.rb:125:in `run'
from /home/vagrant/.rvm/gems/ruby-2.3.1/gems/spring-2.0.0/lib/spring/application/boot.rb:19:in `<top (required)>'
from /home/vagrant/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/vagrant/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>' |
@Urielable @sawantprasann in Rails 5 you should not need this gem, since hstore is supported out of the box. Any particular reason to keep using it? |
One reason we would like to use it is that the default return value for a null DB field is not We could change the DB column default to Also it gives us |
yup removing the gem rails 4.2.8/ruby 2.4.2 |
I am using rails 5 and ruby 2.3.1. when i installed activerecord-postgres-hstore gem i got following error.
/activesupport-5.0.0.1/lib/active_support/core_ext/module/aliasing.rb:37:in
alias_method': undefined method
simplified_type' for classActiveRecord::ConnectionAdapters::PostgreSQLColumn' (NameError) from /activesupport-5.0.0.1/lib/active_support/core_ext/module/aliasing.rb:37:in
alias_method_chain'.The text was updated successfully, but these errors were encountered: