Re: Edge Actionpack Test failures: i18n & rack missing

Student
Sun, 03 Jan 2010 17:16:43 -0000

Installing the gems & requiring rubygems fixes these.  The next
problem is a requirement for rack/test, which I cannot find anywhere:


diff --git a/actionpack/lib/action_view/template/handlers/erb.rb b/
actionpack/lib/action_view/template/handlers/erb.rb
index 93a4315..eee1760 100644
--- a/actionpack/lib/action_view/template/handlers/erb.rb
+++ b/actionpack/lib/action_view/template/handlers/erb.rb
@@ -1,6 +1,16 @@
 require ''active_support/core_ext/class/attribute_accessors''
 require ''active_support/core_ext/string/output_safety''
-require ''erubis''
+begin
+  require ''erubis''
+rescue LoadError => e
+  raise e unless e.message == ''no such file to load --
erubis''
+  require ''rubygems''
+  require ''erubis''
+rescue LoadError => e
+  raise e unless e.message == ''no such file to load --
erubis''
+  $stderr.puts ''!!! erubis gem now required.  Please install the
erubis gem and try again: sudo gem install erubis.''
+  raise e
+end

 module ActionView
   module Template::Handlers
diff --git a/activesupport/lib/active_support/i18n.rb b/activesupport/
lib/active_support/i18n.rb
index 854c60e..33c3693 100644
--- a/activesupport/lib/active_support/i18n.rb
+++ b/activesupport/lib/active_support/i18n.rb
@@ -1,2 +1,13 @@
-require ''i18n''
-I18n.load_path << "#{File.dirname(__FILE__)}/locale/en.yml"
\ No newline at end of file
+begin
+  require ''i18n''
+rescue LoadError => e
+  raise e unless e.message == ''no such file to load -- i18n''
+  require ''rubygems''
+  require ''i18n''
+rescue LoadError => e
+  raise e unless e.message == ''no such file to load -- i18n''
+  $stderr.puts ''!!! The bundled i18n gem is no longer included.
Please install the i18n gem and try again: sudo gem install i18n.''
+  raise e
+end
+
+I18n.load_path << "#{File.dirname(__FILE__)}/locale/en.yml"

The rake/test requirement is at
actionpack/lib/action_dispatch/testing/integration.rb