I am trying to set up a Rails job on Cloudbees and I'm running into problems that I can't solve anymore. I tried to follow the instructions but didn't find enough details to find out what's wrong myself.
This is how the Shell execution section of my job currently looks like:
curl -s -o use-ruby https://repository-cloudbees.forge.cloudbees.com/distributions/ci-addons/ruby/use-ruby
RUBY_VERSION=1.9.3-p327 source ./use-ruby
bundle install --path vendor/bundle
bundle exec rake db:test:create
bundle exec rake test
I'm actually not sure yet about the last 2 lines, since I never made it past line #3 ;)
When I run this, I get the following result:
(...)
Commencing build of Revision 2e1549004e2b49903d4d006ad8bfa7e4b4bfda08 (origin/master)
Checking out Revision 2e1549004e2b49903d4d006ad8bfa7e4b4bfda08 (origin/master)
[API Continuous Testing] $ /bin/sh -xe /tmp/hudson4854632522106638677.sh
+ curl -s -o use-ruby https://repository-cloudbees.forge.cloudbees.com/distributions/ci-addons/ruby/use-ruby
+ RUBY_VERSION=1.9.3-p327
+ source ./use-ruby
++ [[ -z 1.9.3-p327 ]]
++ ruby187='1.8.7-*'
++ [[ 1.9.3-p327 == 1.8.7-* ]]
++ '[' '!' -f /scratch/jenkins/use.sh ']'
++ . /scratch/jenkins/use.sh
++ mkdir -p /scratch/jenkins/ruby
+++ addon_architecture
+++ uname -m
++ ruby_name=ruby-1.9.3-p327-x86_64
++ '[' '!' -f /scratch/jenkins/ruby/ruby-1.9.3-p327-x86_64.tar.bz2 ']'
++ '[' '!' -f /scratch/jenkins/ruby/ruby-1.9.3-p327-x86_64/bin/ruby ']'
++ export PATH=/scratch/jenkins/ruby/ruby-1.9.3-p327-x86_64/bin:/opt/jdk/jdk1.6.latest/bin:/opt/jdk/latest/bin:/usr/lib64/qt-3.3/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/opt/maven/latest/bin:/opt/ant/latest/bin:/opt/android/android-sdk-linux/tools:/opt/gradle/latest/bin:/home/jenkins/bin:/opt/jdk/jdk.latest/bin
++ PATH=/scratch/jenkins/ruby/ruby-1.9.3-p327-x86_64/bin:/opt/jdk/jdk1.6.latest/bin:/opt/jdk/latest/bin:/usr/lib64/qt-3.3/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/opt/maven/latest/bin:/opt/ant/latest/bin:/opt/android/android-sdk-linux/tools:/opt/gradle/latest/bin:/home/jenkins/bin:/opt/jdk/jdk.latest/bin
++ unset GEM_PATH
++ unset GEM_HOME
++ unset BUNDLE_PATH
+ bundle install --path vendor/bundle
/tmp/hudson4854632522106638677.sh: line 5: bundle: command not found
Build step 'Execute shell' marked build as failure
Finished: FAILURE
I assumed that after the Cloudbees installer is finished, "bundle" would be available for me to execute. Is that not right? Or am I missing anything?
Bundler is not included by default as there are many versions (and some people prefer a newer / older / pre-release version).
In regards the following bcrypt issue, it's caused by spaces in the job name. I've renamed the job in question and it now passes.
I've also added the PostgreSQL installer so your full install now completes successfully.
You should refer to http://wiki.cloudbees.com/bin/view/DEV/PostgreSQL for more information on PostgreSQL configuration (preparing the users and databases).