diff options
author | José Valim <jose.valim@gmail.com> | 2010-01-21 12:10:39 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-21 12:10:39 +0100 |
commit | 48dc1ae309d6356991370b9ed4aa9efb25ec9f8d (patch) | |
tree | 7d05119b954c68541ebe7a7dd8ccb9916f3fc620 /railties/lib/rails | |
parent | 31fddf2ace29518399f15f718ff408737e0031a0 (diff) | |
download | rails-48dc1ae309d6356991370b9ed4aa9efb25ec9f8d.tar.gz rails-48dc1ae309d6356991370b9ed4aa9efb25ec9f8d.tar.bz2 rails-48dc1ae309d6356991370b9ed4aa9efb25ec9f8d.zip |
Don't let generators die if rubygems puts crap in your load path.
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/generators.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/railties/lib/rails/generators.rb b/railties/lib/rails/generators.rb index d3175e6a9d..efeeecb685 100644 --- a/railties/lib/rails/generators.rb +++ b/railties/lib/rails/generators.rb @@ -243,7 +243,9 @@ module Rails raise unless e.message =~ /#{Regexp.escape(path)}$/ rescue NameError => e raise unless e.message =~ /Rails::Generator([\s(::)]|$)/ - warn "[WARNING] Could not load generator #{path.inspect} because it's a Rails 2.x generator, which is not supported anymore. Error: #{e.message}" + warn "[WARNING] Could not load generator #{path.inspect} because it's a Rails 2.x generator, which is not supported anymore. Error: #{e.message}.\n#{e.backtrace}" + rescue Exception => e + warn "[WARNING] Could not load generator #{path.inspect}. Error: #{e.message}.\n#{e.backtrace}" end end end |