新手问题 paperclip 的奇怪问题 ArgumentError (invalid byte sequence in UTF-8)

Jacob · 2012年10月10日 · 最后由 luikore 回复于 2012年10月12日 · 6300 次阅读
ArgumentError (invalid byte sequence in UTF-8):

Rendered /Users/zhou/.rvm/gems/ruby-1.9.2-p320/gems/actionpack-3.0.17/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (1.3ms)
Error during failsafe response: ActionView::Template::Error
  /Users/zhou/.rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.0.17/lib/active_support/whiny_nil.rb:48:in `method_missing'
  /Users/zhou/.rvm/gems/ruby-1.9.2-p320/gems/actionpack-3.0.17/lib/action_dispatch/http/parameters.rb:10:in `parameters'
  /Users/zhou/.rvm/gems/ruby-1.9.2-p320/gems/actionpack-3.0.17/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb:3:in `___sers_zhou__rvm_gems_ruby_______p____gems_actionpack________lib_action_dispatch_middleware_templates_rescues_diagnostics_erb___1483444867163265190_70230427679100_3291920484360248562'
  /Users/zhou/.rvm/gems/ruby-1.9.2-p320/gems/actionpack-3.0.17/lib/action_view/template.rb:135:in `block in render'
  /Users/zhou/.rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.0.17/lib/active_support/notifications.rb:54:in `instrument'
  /Users/zhou/.rvm/gems/ruby-1.9.2-p320/gems/actionpack-3.0.17/lib/action_view/template.rb:127:in `render'
  /Users/zhou/.rvm/gems/ruby-1.9.2-p320/gems/actionpack-3.0.17/lib/action_view/render/rendering.rb:59:in `block in _render_template'
  /Users/zhou/.rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.0.17/lib/active_support/notifications.rb:52:in `block in instrument'
  /Users/zhou/.rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.0.17/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
  /Users/zhou/.rvm/gems/ruby-1.9.2-p320/gems/activesupport-3.0.17/lib/active_support/notifications.rb:52:in `instrument'
  /Users/zhou/.rvm/gems/ruby-1.9.2-p320/gems/actionpack-3.0.17/lib/action_view/render/rendering.rb:56:in `_render_template'
  /Users/zhou/.rvm/gems/ruby-1.9.2-p320/gems/actionpack-3.0.17/lib/action_view/render/rendering.rb:26:in `render'
  /Users/zhou/.rvm/gems/ruby-1.9.2-p320/gems/actionpack-3.0.17/lib/action_dispatch/middleware/show_exceptions.rb:88:in `rescue_action_locally'
  /Users/zhou/.rvm/gems/ruby-1.9.2-p320/gems/actionpack-3.0.17/lib/action_dispatch/middleware/show_exceptions.rb:68:in `render_exception'
  /Users/zhou/.rvm/gems/ruby-1.9.2-p320/gems/actionpack-3.0.17/lib/action_dispatch/middleware/show_exceptions.rb:59:in `call'
  /Users/zhou/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.0.17/lib/rails/rack/logger.rb:13:in `call'
  /Users/zhou/.rvm/gems/ruby-1.9.2-p320/gems/rack-1.2.5/lib/rack/runtime.rb:17:in `call'
  /Users/zhou/.rvm/gems/ruby-1.9.2-p320/gems/rack-1.2.5/lib/rack/lock.rb:13:in `block in call'
  <internal:prelude>:10:in `synchronize'
  /Users/zhou/.rvm/gems/ruby-1.9.2-p320/gems/rack-1.2.5/lib/rack/lock.rb:13:in `call'
  /Users/zhou/.rvm/gems/ruby-1.9.2-p320/gems/actionpack-3.0.17/lib/action_dispatch/middleware/static.rb:30:in `call'
  /Users/zhou/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.0.17/lib/rails/application.rb:168:in `call'
  /Users/zhou/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.0.17/lib/rails/application.rb:77:in `method_missing'
  /Users/zhou/.rvm/gems/ruby-1.9.2-p320/gems/railties-3.0.17/lib/rails/rack/log_tailer.rb:14:in `call'
  /Users/zhou/.rvm/gems/ruby-1.9.2-p320/gems/rack-1.2.5/lib/rack/content_length.rb:13:in `call'
  /Users/zhou/.rvm/gems/ruby-1.9.2-p320/gems/rack-1.2.5/lib/rack/handler/webrick.rb:52:in `service'
  /Users/zhou/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
  /Users/zhou/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
  /Users/zhou/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'

一直都好好的,今天莫名其妙出这个问题,另一台机器就没问题,google 完全无果,不知道有没有人知道如何解决?谢谢 ruby1.9.2+rails3.0.17

可能性太多了,从出错栈看不出什么问题

在出错机器上命令行 echo $LANG 看看是不是 UTF-8 吧

需要 登录 后方可回复, 如果你还没有账号请 注册新账号