The latest “stable” version of Integrity (v22) doesn’t play well with Rails 3 (or any other application using bundler 1.0). Basically the Integrity’s Gemfile is used in place of the application’s Gemfile when running the tests.
With a Rails 3 application you are likely to get:
no such file to load -- rails/all

A patched version of integrity v22 for bundler 1.0 is available on http://github.com/pcreux/integrity/tree/v22-bundler-1.0.0.rc.
You also need to force your Rails application to use its Gemfile. To do so, update the file /config/boot.rb with the following:
require 'rubygems'
# Set up gems listed in the Gemfile.
GEMFILE_PATH = File.expand_path('../../Gemfile', __FILE__)
if File.exist?(GEMFILE_PATH)
# Force the rails 3 application to use its Gemfile
ENV['BUNDLE_GEMFILE'] = GEMFILE_PATH
require 'bundler'
Bundler.setup
end
That should make the trick!

Entries (RSS)
Follow me on Twitter
Github repos
LinkedIn profile
Photos
Videos
2 Comments
Thanks for the tip! I think the line needs to be
GEMFILE_PATH = File.expand_path('../../Gemfile', File.dirname(__FILE__))
Hi,
I tried your solution but getting the same error.
My app’s config/boot file is as follows:
require ‘rubygems’
# Set up gems listed in the Gemfile.
#ENV['BUNDLE_GEMFILE'] ||= File.expand_path(‘../../Gemfile’, __FILE__)
#require ‘bundler/setup’ if File.exists?(ENV['BUNDLE_GEMFILE'])
# Set up gems listed in the Gemfile.
GEMFILE_PATH = File.expand_path(‘../../Gemfile’, __FILE__)
if File.exist?(GEMFILE_PATH)
# Force the rails 3 application to use its Gemfile
ENV['BUNDLE_GEMFILE'] = GEMFILE_PATH
require ‘bundler’
Bundler.setup
end
My app is getting checkout properly.Problem comes when running rake task.
Now when i go into the build and run the task it is getting properly executed.