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
Navigate to Ruby Function Definition in VS Code
How to Make a Gemset in Rvm the Default
Accepts_Nested_Attributes_For Rails 4 Is Not Deleting
Verb-Agnostic Matching in Sinatra
Jruby: Import VS Include VS Java_Import VS Include_Class
Start or Ensure That Delayed Job Runs When an Application/Server Restarts
Rails 3, Check CSV File Encoding Before Import
Why Does Openuri Treat Files Under 10Kb in Size as Stringio
How to Access Class Variables in Ruby 1.9
Ruby on Rails: How to Check If a File Is an Image
How to Validate the Presence of a Belongs to Association with Rails
How to Install Ruby 1.9.3 on Ubuntu Without Rvm
Differencebetween "Be_True" and "Be True" in Rspec
Rails: How to Get a File Extension/Postfix Based on the Mime Type
Pg Error Could Not Connect to Server: Connection Refused Is the Server Running on Port 5432