简体   繁体   English

延迟的工作:无法执行耙工作:工作

[英]Delayed Jobs: can't run rake jobs:work

Database:PostgreSQL 9.2 资料库:PostgreSQL 9.2

Delayed_job (3.0.5) 延迟工作(3.0.5)

Delayed_job_active_record (0.4.4) Delayed_job_active_record(0.4.4)

When I try to run rake task, rake aborted with: 当我尝试运行rake任务时,rake因以下原因而中止:

 "invalid byte sequence in UTF-8 (argument error)"

I have no idea what does it mean. 我不知道这是什么意思。

As it probably really hard to debug, any advices appresiated: may be I need to reinstall something, try another gem, or anything. 由于可能真的很难调试,因此建议不胜枚举:可能是我需要重新安装某些东西,尝试另一个gem或其他东西。

Thanks in advance. 提前致谢。

[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>'

Ruby 1.9.3, right? Ruby 1.9.3,对吗?

On the top of your Rakefile (and any file with non-ascii characters), include the following: 在Rakefile(以及任何带有非ASCII字符的文件)的顶部,包括以下内容:

# encoding: utf-8

The reason is that this gem sets up some kind of virtual hosting, and assigns it to name of your PC. 原因是该gem设置了某种虚拟主机,并将其分配给您的PC名称。 So if it contains some invalid for latin library character, it causes error. 因此,如果它包含一些对拉丁库字符无效的字符,则会导致错误。 Just renamed my system - works fine. 刚重命名了我的系统-运行正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM