aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/i18n.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/i18n.rb')
-rw-r--r--activesupport/lib/active_support/i18n.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/i18n.rb b/activesupport/lib/active_support/i18n.rb
index 11af48d67e..0ffdd904fd 100644
--- a/activesupport/lib/active_support/i18n.rb
+++ b/activesupport/lib/active_support/i18n.rb
@@ -1,3 +1,8 @@
-require 'i18n'
+begin
+ require 'i18n'
+rescue LoadError => e
+ $stderr.puts "You don't have i18n installed in your application. Please add it to your Gemfile and run bundle install"
+ raise e
+end
I18n.load_path << "#{File.dirname(__FILE__)}/locale/en.yml"
-ActiveSupport.run_load_hooks(:i18n) \ No newline at end of file
+ActiveSupport.run_load_hooks(:i18n)