在运行capybara / rspec集成测试时,我一直在Jenkins中得到这个:
/root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-3.4.4/lib/rspec/core/source.rb:23:in `split': invalid byte sequence in US-ASCII (ArgumentError)
在本地和Sauce Labs上运行良好但在使用Sauce Labs的夜间Jenkins工作期间失败
配置 - >构建 - >执行Shell:
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8
bundle
rspec ./test
这不允许我设置LC_ALL
,但将其余部分设为US.UTF-8
:
+ export LANG=en_US.UTF-8
+ LANG=en_US.UTF-8
+ export LANGUAGE=en_US.UTF-8
+ LANGUAGE=en_US.UTF-8
+ export LC_ALL=en_US.UTF-8
+ LC_ALL=en_US.UTF-8
/tmp/hudson4925070278170448562.sh: line 4: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
+ export LC_CTYPE=en_US.UTF-8
+ LC_CTYPE=en_US.UTF-8
+ bundle
我错过了什么吗?
另外,添加双引号至关重要吗?
export LANG="en_US.UTF-8"
export LANGUAGE="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"