mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-09 22:16:07 +01:00
948 B
948 B
title | date | draft | emoji | images | tags | ||||
---|---|---|---|---|---|---|---|---|---|
Ruby and Jenkins | 2013-03-01T09:37:00+00:00 | false | ⚙️ |
|
I was trying to integrate my Cucumber and RSpec tests with Jenkins earlier this week and came across a bunch of character encoding errors.
It took me a while to figure out the problem, essentially Jenkins loads a session without all your usual environment variables, so your PATH
and LANG
won't be set to the same as a terminal window, making the outcomes different.
My Jenkins executed shell script now looks like this, note the PATH and LANG exports!
export LANG=en_GB.UTF-8
export PATH=/Users/admin/.rvm/gems/ruby-1.9.3-p385/bin:/Users/admin/.rvm/gems/ruby-1.9.3-p385@global/bin:/Users/admin/.rvm/rubies/ruby-1.9.3-p385/bin:/Users/admin/.rvm/bin:/usr/local/bin:$PATH
rvm use 1.9.3 --install --binary --fuzzy
bundle install
ruby --version
gem --version
rake spec
rake features