0

I am using Rails 3.2.13 and ruby 1.9.2p320 (2012-04-20 revision 35421) [x86_64-linux] in CentOS 5.6 . When i run db:seed process i got the following error message

rake aborted!
invalid byte sequence in UTF-8
/usr/local/rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.2.13/lib/active_support/core_ext/object/blank.rb:105:in `=~'
/usr/local/rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.2.13/lib/active_support/core_ext/object/blank.rb:105:in `!~'
/usr/local/rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.2.13/lib/active_support/core_ext/object/blank.rb:105:in `blank?'
/usr/local/rvm/gems/ruby-1.9.2-p320/gems/activemodel-3.2.13/lib/active_model/errors.rb:255:in `block in add_on_blank'
/usr/local/rvm/gems/ruby-1.9.2-p320/gems/activemodel-3.2.13/lib/active_model/errors.rb:253:in `each'
/usr/local/rvm/gems/ruby-1.9.2-p320/gems/activemodel-3.2.13/lib/active_model/errors.rb:253:in `add_on_blank'
/usr/local/rvm/gems/ruby-1.9.2-p320/gems/activemodel-3.2.13/lib/active_model/validations/presence.rb:8:in `validate'
/usr/local/rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:310:in `_callback_before_2997'
/usr/local/rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:407:in `_run__3451238938034873984__validate__3894789870199871463__callbacks'

blank.rb line no : 105 contains self !~ /[^[:space:]]/. I tried # encoding: utf-8 but it's never solve the issue. Any other solutions to solve this issue...

Bathakarai
  • 1,517
  • 6
  • 23
  • 39
  • I would say there is something wrong with your seeds.rb file. Can you post it somewhere if it's too big to be posted here? – rmagnum2002 Jul 24 '13 at 10:29
  • @rmagnum2002 I am sure, the problem not in my seed file. If i comment this line means rest of the process is working.. – Bathakarai Jul 24 '13 at 10:32
  • what line? in seed file, you were saying something about blank.rb file. – rmagnum2002 Jul 24 '13 at 10:34
  • It's a gem file located in /usr/local directory. Whn i insert some data it invokes model; from the model the control goes to gem file. – Bathakarai Jul 24 '13 at 10:39
  • ok, is there any chance to see your Gemfile and seeds.rb file. Having this issue only at rake db:seed I think the problem is in seed file or you are using a gem that seeds your db with data probably, hard to guess what it might be. – rmagnum2002 Jul 24 '13 at 10:50

0 Answers0