On Tue, Sep 28, 2010 at 1:49 PM, Todd Sedano <[email protected]> wrote: > For the next person who wants to get cruise control to work with bundler (in > a hurry) here's what I did to solve my issue: > a) modified my the project to use the shell command > (project/cruise_config.rb) > project.build_command = '../build_my_app.sh' > b) created a project/build_my_app.sh with the contents > bundle install > ruby -e "require 'rubygems' rescue nil; require 'rake'; load > '/Users/tsedano/cruisecontrol-1.4.0/tasks/cc_build.rake'; ARGV << > '--nosearch' << 'cc:build'; Rake.application.run; ARGV.clear" > > Chad, > I thank you for your help and I was very tempted to call, but didn't want to > interrupt your day. > Thanks for the pointer to the Bundler website. All our projects have > followed the directions on this page: http://gembundler.com/rails23.html -- > I'm sure there is a way to force bundle install to run everytime that rails > is started up, but I didn't want to slow down the development teams.
The way we get around this it to check an environment variable - "IS_CI_BOX" - in preinitializer.rb. We only run bundle install if this is true. So, developers have to run it manually, but it always runs on CI. > Here is the reason I think I need to call bundle install before the cruise > control rake file gets started, I see the error message: > > ruby -e "require 'rubygems' rescue nil; require 'rake'; load > '/Users/tsedano/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`? Bundler has to be trying to run before it installs gems. This is probably because you didn't call 'bundle install' in preinitializer.rb. You can debug this pretty easily, put some debug statments into preinitializer.rb and make sure 'bundle install' runs before your rails environment (and bundler) attempts to set up the load path. > > The way I read this error, I think it means that the default cruise control > rake is failing and needs bundler to run before it even gets to my rake task > for the project. I am not a cruise control developer. so I could be wrong. > There could be a more elegant way to solve this. I was hoping that modifying > cruisecontrol-1.4.0/tasks/cc_build.rake, but it didn't work for me. > _______________________________________________ Cruisecontrolrb-users mailing list [email protected] http://rubyforge.org/mailman/listinfo/cruisecontrolrb-users
