Can't Run Jenkins Build - Bundle: "Command Not Found"

Jenkins: ruby command not found for build

Since you are exporting ruby path in the PATH variable, you need to source .bash_profile at the beginning of your jenkins job so that it will export the variables for that shell/job.

Thanks,
Piyush

Bundler: Command not found

You need to add the ruby gem executable directory to your path

export PATH=$PATH:/opt/ruby-enterprise-1.8.7-2010.02/bin

Jekins iOS fastlane build: Could not find 'bundler'

Try to set your source to rvm, I have a setup like this:

export GEM_HOME=\$HOME/.rvm/gems/ruby-2.5.0
export GEM_PATH=\$HOME/.rvm/gems/ruby-2.5.0:\$HOME/.rvm/gems/ruby-2.5.0@global
LANG=en_US.UTF-8
source "\$HOME/.rvm/scripts/rvm"
bundle update && bundle install
bundle exec fastlane $cmd

It looks like your are using the wrong ruby version in the Jenkins JVM:

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0...

you may need to set the right version with rvm use 2.5.0 before calling bundle ...

The main problem with Jenkins is, that it is running in a different environment then your terminal (your Mac in general) because of the JVM it's working in.
Duo to this setup, you need to call your setup like mine always before you make a call to your Bundler (or any ruby gem).



Related Topics



Leave a reply



Submit