gpt4 book ai didi

ruby-on-rails - US-ASCII 中的无效字节序列(ArgumentError),没有任何帮助

转载 作者:数据小太阳 更新时间:2023-10-29 08:14:32 25 4
gpt4 key购买 nike

每当我运行 rake db:create 时,我都会突然出现错误。错误是

rake aborted!
/home/me/.rvm/gems/ruby-1.9.3-p392/gems/rake-10.0.4/lib/rake/trace_output.rb:16:in `block in trace_on': invalid byte sequence in US-ASCII (ArgumentError)
from /home/me/.rvm/gems/ruby-1.9.3-p392/gems/rake-10.0.4/lib/rake/trace_output.rb:14:in `map'
from /home/me/.rvm/gems/ruby-1.9.3-p392/gems/rake-10.0.4/lib/rake/trace_output.rb:14:in `trace_on'
from /home/me/.rvm/gems/ruby-1.9.3-p392/gems/rake-10.0.4/lib/rake/application.rb:328:in `trace'
from /home/me/.rvm/gems/ruby-1.9.3-p392/gems/rake-10.0.4/lib/rake/application.rb:183:in `display_error_message'
from /home/me/.rvm/gems/ruby-1.9.3-p392/gems/rake-10.0.4/lib/rake/application.rb:169:in `rescue in standard_exception_handling'
from /home/me/.rvm/gems/ruby-1.9.3-p392/gems/rake-10.0.4/lib/rake/application.rb:159:in `standard_exception_handling'
from /home/me/.rvm/gems/ruby-1.9.3-p392/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'
from /home/me/.rvm/gems/ruby-1.9.3-p392/gems/rake-10.0.4/bin/rake:33:in `<top (required)>'
from /home/me/.rvm/gems/ruby-1.9.3-p392/bin/rake:23:in `load'
from /home/me/.rvm/gems/ruby-1.9.3-p392/bin/rake:23:in `<main>'

我做了

me@ubuntu:~ export LANG="C.UTF-8"
me@ubuntu:~ export LC_ALL="C.UTF-8"

我得到了

me@ubuntu:~ echo $LANG
en_US
me@ubuntu:~ echo $LC_ALL
en_US.UTF-8

最佳答案

尝试添加字符串作为此任务涉及的文件的第一行:

#encoding: utf-8

这些文件可能是您所有的自定义初始化程序、您的 database.yml 等

关于ruby-on-rails - US-ASCII 中的无效字节序列(ArgumentError),没有任何帮助,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17209067/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com