Skip to content
Browse files

Require hpricot within the rake task itself

  • Loading branch information...
1 parent ca5ccd1 commit 99b494e775e62ce01dd478eda1f2cbb40a115430 @scharfie scharfie committed with
Showing with 6 additions and 1 deletion.
  1. +6 −1 tasks/localized_country_select_tasks.rake
7 tasks/localized_country_select_tasks.rake
@@ -1,5 +1,4 @@
require 'rubygems'
-require 'hpricot'
require 'open-uri'
# Rake task for importing country names from's CLDR repository
@@ -21,6 +20,12 @@ namespace :import do
desc "Import country codes and names for various languages from the CLDR archive. Depends on Hpricot gem."
task :country_select do
+ begin
+ require 'hpricot'
+ rescue LoadError
+ puts "Error: Hpricot library required to use this task (import:country_select)"
+ exit
+ end
# TODO : Implement locale import chooser from CLDR root via Highline

0 comments on commit 99b494e

Please sign in to comment.
Something went wrong with that request. Please try again.