2

I keep getting this in Jenkins when running capybara/rspec integration tests:

/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)

Runs fine locally and on Sauce Labs but fails during the nightly Jenkins jobs using Sauce Labs

Configure -> Build -> Execute 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

This doesn't allow me to set LC_ALL but sets the rest to 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

Am I missing something?

Also, is adding double quotes crucial?

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"
danksim
  • 617
  • 3
  • 9
  • 27

0 Answers0