Skip to content

Instantly share code, notes, and snippets.

@chef
Created July 29, 2009 19:09
Show Gist options
  • Save chef/158341 to your computer and use it in GitHub Desktop.
Save chef/158341 to your computer and use it in GitHub Desktop.
diff --git a/merb-core/lib/merb-core/core_ext/kernel.rb b/merb-core/lib/merb-cor
index f5afea0..0a655e1 100644
--- a/merb-core/lib/merb-core/core_ext/kernel.rb
+++ b/merb-core/lib/merb-core/core_ext/kernel.rb
@@ -142,8 +142,13 @@ module Kernel
return unless dep.require_as
Gem.activate(dep)
rescue Gem::LoadError => e
- e.set_backtrace dep.original_caller
- Merb.fatal! "The gem #{name}, #{ver.inspect} was not found", e
+ begin
+ Merb.debug "Falling back to a regular require"
+ require name
+ rescue LoadError => le
+ e.set_backtrace dep.original_caller
+ Merb.fatal! "The gem #{name}, #{ver.inspect} was not found, and we coul
+ end
end
begin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment