Rails - rake db:reset rake error -
i've been wrangling hours , can't figure out going on. trying run rake db:reset , following error:
rake aborted! /users/zephyr4434/.rvm/gems/ruby-1.9.3-p385/gems/rake-10.0.4/lib/rake/trace_output.rb:16:in `block in trace_on': invalid byte sequence in us-ascii (argumenterror) /users/zephyr4434/.rvm/gems/ruby-1.9.3-p385/gems/rake-10.0.4/lib/rake/trace_output.rb:14:in `map' /users/zephyr4434/.rvm/gems/ruby-1.9.3-p385/gems/rake-10.0.4/lib/rake/trace_output.rb:14:in `trace_on' /users/zephyr4434/.rvm/gems/ruby-1.9.3-p385/gems/rake-10.0.4/lib/rake/application.rb:328:in `trace' /users/zephyr4434/.rvm/gems/ruby-1.9.3-p385/gems/rake-10.0.4/lib/rake/application.rb:183:in `display_error_message' /users/zephyr4434/.rvm/gems/ruby-1.9.3-p385/gems/rake-10.0.4/lib/rake/application.rb:169:in `rescue in standard_exception_handling' /users/zephyr4434/.rvm/gems/ruby-1.9.3-p385/gems/rake-10.0.4/lib/rake/application.rb:159:in `standard_exception_handling' /users/zephyr4434/.rvm/gems/ruby-1.9.3-p385/gems/rake-10.0.4/lib/rake/application.rb:70:in `run' /users/zephyr4434/.rvm/gems/ruby-1.9.3-p385/gems/rake-10.0.4/bin/rake:33:in `<top (required)>' /users/zephyr4434/.rvm/gems/ruby-1.9.3-p385/bin/rake:23:in `load' /users/zephyr4434/.rvm/gems/ruby-1.9.3-p385/bin/rake:23:in `<main>' i have no idea causing this. tried removing gems i've installed not sure else can do.
the rake db:reset seems work , @ end of console.
any ideas of causing this?
ok figured out. forgot rake db:reset runs seeds.rb file , turns out had bad data in file causing issue, not broader environment issue.
put #encoding: utf-8 in first line of rakefile
update
add these lines top of gemfile (solution found here)
if ruby_version =~ /1.9/ encoding.default_external = encoding::utf_8 encoding.default_internal = encoding::utf_8 end
Comments
Post a Comment