diff options
author | wycats <wycats@gmail.com> | 2010-03-22 14:08:50 -0700 |
---|---|---|
committer | wycats <wycats@gmail.com> | 2010-03-22 14:09:00 -0700 |
commit | d03af48a7d215e121e57a5621c0c57a834f473a1 (patch) | |
tree | 4f0ba008daabc6201ed3e69613f34deb923ddc6f /railties/lib/rails | |
parent | a4090bca6a837a187ea0698c25e5d66c89409667 (diff) | |
download | rails-d03af48a7d215e121e57a5621c0c57a834f473a1.tar.gz rails-d03af48a7d215e121e57a5621c0c57a834f473a1.tar.bz2 rails-d03af48a7d215e121e57a5621c0c57a834f473a1.zip |
Provide a better error if thor is missing
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/generators/base.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/railties/lib/rails/generators/base.rb b/railties/lib/rails/generators/base.rb index 9624c35c0b..27e8d8483d 100644 --- a/railties/lib/rails/generators/base.rb +++ b/railties/lib/rails/generators/base.rb @@ -1,4 +1,12 @@ -require 'thor/group' +begin + require 'thor/group' +rescue LoadError + puts "Thor is not available.\nIf you ran this command from a git checkout " \ + "of Rails, please make sure thor is installed,\nand run this command " \ + "as `ruby -rubygems /path/to/rails myapp --dev`" + exit +end + require 'rails/generators/actions' module Rails |