数据库:PostgreSQL 9.2
Delayed_job(3.0.5)
Delayed_job_active_record(0.4.4)
当我尝试运行rake任务时,rake中止了:
"invalid byte sequence in UTF-8 (argument error)"
我不知道它是什么意思。
由于调试可能非常困难,所以任何建议都可以解决:可能是我需要重新安装一些东西,尝试其他宝石或任何东西。
提前致谢。
[Worker(host:HP-�� pid:4768)] Starting job worker
rake aborted!
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/trace_output.rb:16:in `block in trace_on': invalid byte sequence in UTF-8 (ArgumentError)
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/trace_output.rb:14:in `map'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/trace_output.rb:14:in `trace_on'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:328:in `trace'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:183:in `display_error_message'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:169:in `rescue in standard_exception_handling'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:159:in `standard_exception_handling'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.0.4/bin/rake:33:in `<top (required)>'
from C:/Ruby193/bin/rake:23:in `load'
from C:/Ruby193/bin/rake:23:in `<top (required)>'
from -e:1:in `load'
from -e:1:in `<main>'
答案 0 :(得分:2)
Ruby 1.9.3,对吧?
在Rakefile的顶部(以及任何包含非ascii字符的文件),包含以下内容:
# encoding: utf-8
答案 1 :(得分:2)
原因是这个gem设置了某种虚拟主机,并将其分配给您的PC名称。因此,如果它包含拉丁库字符的某些无效,则会导致错误。刚重命名我的系统 - 工作正常。