diff options
author | Alexey Gaziev <alex.gaziev@gmail.com> | 2011-06-20 19:54:37 +0400 |
---|---|---|
committer | Alexey Gaziev <alex.gaziev@gmail.com> | 2011-06-20 19:54:37 +0400 |
commit | ca044113f38ed900fe30790c87a87089e4e9bcee (patch) | |
tree | c0dab0cbcd37f9b610cac71cacb5b223425d0994 /railties/lib | |
parent | 81f7bf55c7e15f05015e480505897a82b4038242 (diff) | |
download | rails-ca044113f38ed900fe30790c87a87089e4e9bcee.tar.gz rails-ca044113f38ed900fe30790c87a87089e4e9bcee.tar.bz2 rails-ca044113f38ed900fe30790c87a87089e4e9bcee.zip |
Fix regexp in generators for right catching error message
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/generators.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/generators.rb b/railties/lib/rails/generators.rb index 355b05ce0b..bf1b7a5e85 100644 --- a/railties/lib/rails/generators.rb +++ b/railties/lib/rails/generators.rb @@ -300,7 +300,7 @@ module Rails rescue LoadError => e raise unless e.message =~ /#{Regexp.escape(path)}$/ rescue NameError => e - raise unless e.message =~ /Rails::Generator([\s(::)]|$)/ + 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}.\n#{e.backtrace.join("\n")}" rescue Exception => e warn "[WARNING] Could not load generator #{path.inspect}. Error: #{e.message}.\n#{e.backtrace.join("\n")}" |