<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -143,6 +143,16 @@ ActiveSupport::CoreExtensions::Time::Conversions::DATE_FORMATS.merge!(
 
 ActionMailer::Base.default_charset = 'utf-8'
 
+# I wanted to put this as a &quot;setup&quot; page, but it seems I can't catch the 
+# exception fast enough and get a 500 error
+if RAILS_ENV != 'test'
+  begin
+    ActiveRecord::Base.connection.select_all(&quot;select * from sessions&quot;)
+  rescue
+    Migrator.migrate
+  end
+end
+
 if RAILS_ENV != 'test'
   begin
     mail_settings = YAML.load(File.read(&quot;#{RAILS_ROOT}/config/mail.yml&quot;))</diff>
      <filename>config/environment.rb</filename>
    </modified>
    <modified>
      <diff>@@ -8,7 +8,7 @@ config.whiny_nils        = true
 
 # Show full error reports and disable caching
 config.action_controller.consider_all_requests_local = true
-config.action_controller.perform_caching             = true
+config.action_controller.perform_caching             = false
 
 # Don't care if the mailer can't send
 config.action_mailer.raise_delivery_errors = false</diff>
      <filename>config/environments/development.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>0871cedde3d06d1d95e35bccaae4b63d6c6d30ec</id>
    </parent>
  </parents>
  <author>
    <name>Fr&#233;d&#233;ric de Villamil</name>
    <login>fdv</login>
    <email>frederic@de-villamil.com</email>
  </author>
  <url>http://github.com/fdv/typo/commit/17733204bd66b206f07e8f99869a8666261c0dbd</url>
  <id>17733204bd66b206f07e8f99869a8666261c0dbd</id>
  <committed-date>2007-12-26T07:56:08-08:00</committed-date>
  <authored-date>2007-12-26T07:56:08-08:00</authored-date>
  <message>Adds a &quot;setup&quot; in the environment.rb, running migrations if the table session doesn't exist.

I wanted to create a cool setup page allowing the user a 1 click install like on many blogwares, catching an exception in the application.rb. It seems that rails tries to select from the sessions table before my application can do anything and throw an exception resulting in a 500 error. So, the only place to put that code snippet was in application.rb. Irk !

git-svn-id: http://svn.typosphere.org/typo/branches/rails_2@1589 820eb932-12ee-0310-9ca8-eeb645f39767</message>
  <tree>71341297e2297d870a6673ab044f8e2e42cc6a69</tree>
  <committer>
    <name>Fr&#233;d&#233;ric de Villamil</name>
    <login>fdv</login>
    <email>frederic@de-villamil.com</email>
  </committer>
</commit>
