Skip to content

Commit

Permalink
Remove rescue as it was clobbering the real error.
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Apr 15, 2011
1 parent 7dea4b5 commit ae13cb1
Showing 1 changed file with 8 additions and 31 deletions.
39 changes: 8 additions & 31 deletions load_paths.rb
Original file line number Diff line number Diff line change
@@ -1,32 +1,9 @@
begin
require File.expand_path('../.bundle/environment', __FILE__)
rescue LoadError
begin
# bust gem prelude
if defined? Gem
Gem.source_index
gem 'bundler'
else
require 'rubygems'
end
require 'bundler'
Bundler.setup
rescue LoadError
module Bundler
def self.require(*args, &block); end
def self.method_missing(*args, &block); end
end

%w(
actionmailer
actionpack
activemodel
activerecord
activeresource
activesupport
railties
).each do |framework|
$:.unshift File.expand_path("../#{framework}/lib", __FILE__)
end
end
# bust gem prelude
if defined? Gem
Gem.source_index
gem 'bundler'
else
require 'rubygems'
end
require 'bundler'
Bundler.setup

0 comments on commit ae13cb1

Please sign in to comment.