Permalink
Browse files

If we cannot load a rake task, simply print a warning message.

  • Loading branch information...
1 parent 780912d commit 041625865e9a8c008e92d9ed0aee016b12b5d809 @postmodern postmodern committed Aug 9, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 padrino-core/lib/padrino-core/cli/rake_tasks.rb
@@ -1,5 +1,11 @@
# Load rake tasks from common rake task definition locations
-Dir["{lib/tasks/**,tasks/**,test,spec}/*.rake"].each { |rake| load(rake) }
+Dir["{lib/tasks/**,tasks/**,test,spec}/*.rake"].each do |file|
+ begin
+ load(file)
+ rescue LoadError => e
+ warn "#{file}: #{e.message}"
+ end
+end
# Loads the Padrino applications mounted within the project
# setting up the required environment for Padrino

0 comments on commit 0416258

Please sign in to comment.