#280 new

Bundler and cruisecontrol.rb

Reported by professor | June 21st, 2010 @ 08:52 AM

I'm switching to Bundler for a rails 2.3 project. Is there anything magical that I should do on my CI machine? I did do a "sudo gem install bundler." I'm guessing that I want to do a "bundle install" each time there is a source code change, or even better, a change to the Gemfile. Should I modify my preinitializer.rb ?

Thanks for the help!

/Users/me/.cruise/projects/CMUEducation/work tsedano$ ruby -e "require 'rubygems' rescue nil; require 'rake'; load '/Users/me/cruisecontrol-1.4.0/tasks/cc_build.rake'; ARGV << '--nosearch' << 'cc:build'; Rake.application.run; ARGV.clear" rake aborted! Bundler couldn't find some gems. Did you run bundle install? /Users/me/.cruise/projects/CMUEducation/work/Rakefile:4

Comments and changes to this ticket

  • professor

    professor June 22nd, 2010 @ 01:19 PM

    Modifying cruise.rake like this should help..... maybe we can add this to the documentation?

    require 'rubygems'
    require 'rake'
    require 'fileutils'
    require "bundler"

    desc "Task for cruise Control"
    task :cruise do
    RAILS_ENV = ENV['RAILS_ENV'] = 'test'

    sh "bundle install"
    Bundler.setup(:default, :test)

  • Brian Underwood

    Brian Underwood November 20th, 2010 @ 04:43 AM

    • Milestone order changed from “0” to “0”

    FYI, so that my build log didn't get as full, I removed all lines that started with "Using " so that I would only see when there were changes from Bundler:

    To do that I changed the following line:

    sh "bundle install"

    To this:

    puts bundle install --deployment.split(/\n/).reject {|line| line =~ /^Using / }.join("\n")

  • Brian Underwood

    Brian Underwood November 20th, 2010 @ 04:44 AM

    Bah, forgot to use a code block:

      puts `bundle install --deployment`.split(/\n/).reject {|line| line =~ /^Using / }.join("\n")

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket