Ruby错误:iconv will be deprecated in the future, use String#encode instead.

ruby报错信息如下:

sinber$ rake db:migrate --trace

/Users/sinber/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.2.9/lib/active_support/dependencies.rb:251:in `block in require': iconv will be deprecated in the future, use String#encode instead.

这是由于没有设置字符编码报的错

解决办法:

终端输入命令

sinber$ export RUBYOPT="-KU -E utf-8:utf-8"