Rails 4.2 Time_zone_conversion.rb Error. How do I fix this? -


i totally lost on one. i'm using ruby 2.2.4 , upgrading app rails 4.1.0 4.2. app working fine. changed gemfile use:

gem 'rails', '~>4.2' 

then ran spec tests , app blew error:

 usr/local/rvm/rubies/ruby-2.2.4/bin/ruby -i/path-to-my-app/vendor/bundle/ruby/2.2.0/gems/rspec-core-3.5.0/lib:/path-to-my-app/vendor/bundle/ruby/2.2.0/gems/rspec-support-3.5.0/lib /path-to-my-app/vendor/bundle/ruby/2.2.0/gems/rspec-core-3.5.0/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb  coverage report generated rspec /path-to-my-app/coverage. 22 / 1206 loc (1.82%) covered.  /path-to-my-app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.7.1/lib/active_record/attribute_methods/time_zone_conversion.rb:64:in `create_time_zone_conversion_attribute?': undefined method `type' "number(38)":string (nomethoderror) /path-to-my-app/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.7.1/lib/active_record/attribute_methods/time_zone_conversion.rb:53:in `block (2 levels) in inherited' 

when try load app in browser error:

undefined method 'type' "number(38)":string 

i google'd on , found 1 post. here in stackoverflow: nomethoderror: undefined method 'type' nil:nilclass in rails, led me to: https://gist.github.com/alsemyonov/88826/revisions

i tried fix posted in github app, still same error.

a mention of 'time_zone_conversion.rb' in error , read made me think :datetime related. have 1 method in couple of models works on date field "updated_at". not sure if related or not.

def updated_at_formatted   self.updated_at.strftime("%m/%d/%y") end 

i'm using gem 'american_date'.

any ideas on causing , how fix appreciated.

thanks,

found it: oracle enhanced adapter version 1.6 supports rails 4.2 , not support rails 4.1 or lower version of rails. when using ruby on rails version 4.2 in gemfile include

gem 'activerecord-oracle_enhanced-adapter', '~> 1.6.0' 

a co-worker , stepped through stacktrace on error. felt line:

undefined method 'type' "number(38)":string 

was somehow tied database issue, app oracle. googling on issues on rails 4.2 upgrade , above oracle gem led above answer.


Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -