Permalink
Browse files

Provide a better error if thor is missing

  • Loading branch information...
1 parent a4090bc commit d03af48a7d215e121e57a5621c0c57a834f473a1 @wycats wycats committed Mar 22, 2010
Showing with 9 additions and 1 deletion.
  1. +9 −1 railties/lib/rails/generators/base.rb
View
10 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

0 comments on commit d03af48

Please sign in to comment.