| |   |
| 24 | 24 | File.exist?("#{RAILS_ROOT}/vendor/rails") |
| 25 | 25 | end |
| 26 | 26 | |
| 27 | # FIXME : Ruby 1.9 |
| 27 | 28 | def preinitialize |
| 28 | 29 | load(preinitializer_path) if File.exists?(preinitializer_path) |
| 29 | 30 | end |
| … | … | |
| 94 | 94 | end |
| 95 | 95 | |
| 96 | 96 | def parse_gem_version(text) |
| 97 | | $1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*'([!~<>=]*\s*[\d.]+)'/ |
| 97 | $1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/ |
| 98 | 98 | end |
| 99 | 99 | |
| 100 | 100 | private |
| toggle raw diff |
--- a/config/boot.rb
+++ b/config/boot.rb
@@ -24,6 +24,7 @@ module Rails
File.exist?("#{RAILS_ROOT}/vendor/rails")
end
+ # FIXME : Ruby 1.9
def preinitialize
load(preinitializer_path) if File.exists?(preinitializer_path)
end
@@ -93,7 +94,7 @@ module Rails
end
def parse_gem_version(text)
- $1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*'([!~<>=]*\s*[\d.]+)'/
+ $1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/
end
private |
| |   |
| 1 | | # MySQL (default setup). Versions 4.1 and 5.0 are recommended. |
| 2 | | # |
| 3 | | # Install the MySQL driver: |
| 4 | | # gem install mysql |
| 5 | | # On Mac OS X: |
| 6 | | # sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql |
| 7 | | # On Mac OS X Leopard: |
| 8 | | # sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config |
| 9 | | # This sets the ARCHFLAGS environment variable to your native architecture |
| 10 | | # On Windows: |
| 11 | | # gem install mysql |
| 12 | | # Choose the win32 build. |
| 13 | | # Install MySQL and put its /bin directory on your path. |
| 14 | | # |
| 15 | | # And be sure to use new-style password hashing: |
| 16 | | # http://dev.mysql.com/doc/refman/5.0/en/old-client.html |
| 1 | # SQLite version 3.x |
| 2 | # gem install sqlite3-ruby (not necessary on OS X Leopard) |
| 17 | 3 | development: |
| 18 | | adapter: mysql |
| 19 | | encoding: utf8 |
| 20 | | database: rails-skeleton_development |
| 21 | | username: root |
| 22 | | password: |
| 23 | | socket: /var/run/mysqld/mysqld.sock |
| 4 | adapter: sqlite3 |
| 5 | database: db/development.sqlite3 |
| 6 | timeout: 5000 |
| 24 | 7 | |
| 25 | 8 | # Warning: The database defined as 'test' will be erased and |
| 26 | 9 | # re-generated from your development database when you run 'rake'. |
| 27 | 10 | # Do not set this db to the same as development or production. |
| 28 | 11 | test: |
| 29 | | adapter: mysql |
| 30 | | encoding: utf8 |
| 31 | | database: rails-skeleton_test |
| 32 | | username: root |
| 33 | | password: |
| 34 | | socket: /var/run/mysqld/mysqld.sock |
| 12 | adapter: sqlite3 |
| 13 | database: db/test.sqlite3 |
| 14 | timeout: 5000 |
| 35 | 15 | |
| 36 | 16 | production: |
| 37 | | adapter: mysql |
| 38 | | encoding: utf8 |
| 39 | | database: rails-skeleton_production |
| 40 | | username: root |
| 41 | | password: |
| 42 | | socket: /var/run/mysqld/mysqld.sock |
| 17 | adapter: sqlite3 |
| 18 | database: db/production.sqlite3 |
| 19 | timeout: 5000 |
| toggle raw diff |
--- a/config/database.yml
+++ b/config/database.yml
@@ -1,42 +1,19 @@
-# MySQL (default setup). Versions 4.1 and 5.0 are recommended.
-#
-# Install the MySQL driver:
-# gem install mysql
-# On Mac OS X:
-# sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql
-# On Mac OS X Leopard:
-# sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
-# This sets the ARCHFLAGS environment variable to your native architecture
-# On Windows:
-# gem install mysql
-# Choose the win32 build.
-# Install MySQL and put its /bin directory on your path.
-#
-# And be sure to use new-style password hashing:
-# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
+# SQLite version 3.x
+# gem install sqlite3-ruby (not necessary on OS X Leopard)
development:
- adapter: mysql
- encoding: utf8
- database: rails-skeleton_development
- username: root
- password:
- socket: /var/run/mysqld/mysqld.sock
+ adapter: sqlite3
+ database: db/development.sqlite3
+ timeout: 5000
# Warning: The database defined as 'test' will be erased and
# re-generated from your development database when you run 'rake'.
# Do not set this db to the same as development or production.
test:
- adapter: mysql
- encoding: utf8
- database: rails-skeleton_test
- username: root
- password:
- socket: /var/run/mysqld/mysqld.sock
+ adapter: sqlite3
+ database: db/test.sqlite3
+ timeout: 5000
production:
- adapter: mysql
- encoding: utf8
- database: rails-skeleton_production
- username: root
- password:
- socket: /var/run/mysqld/mysqld.sock
+ adapter: sqlite3
+ database: db/production.sqlite3
+ timeout: 5000 |
| |   |
| 5 | 5 | # ENV['RAILS_ENV'] ||= 'production' |
| 6 | 6 | |
| 7 | 7 | # Specifies gem version of Rails to use when vendor/rails is not present |
| 8 | | RAILS_GEM_VERSION = '2.0.1' unless defined? RAILS_GEM_VERSION |
| 8 | RAILS_GEM_VERSION = '2.0.2' unless defined? RAILS_GEM_VERSION |
| 9 | 9 | |
| 10 | 10 | # Bootstrap the Rails environment, frameworks, and default configuration |
| 11 | 11 | require File.join(File.dirname(__FILE__), 'boot') |
| … | … | |
| 38 | 38 | # no regular words or you'll be exposed to dictionary attacks. |
| 39 | 39 | config.action_controller.session = { |
| 40 | 40 | :session_key => '_rails-skeleton_session', |
| 41 | | :secret => 'd621ee17b00e1f40f6e23159735767aa4b06587e6380e8d9b153ef23a281b23d93ff52a8825e0c453d753affcbe6fedb3c71244cadfca9c8a80f1820fc455592' |
| 41 | :secret => '4c57d67aebd343f26e4aa5186143c5ae44fd1b2dbec93c63c6300a66d27744d67220e68ef74a7aa261b8078eac05982dec989c6d57955c3343a0b0f89fb5d662' |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | # Use the database for sessions instead of the cookie-based default, |
| toggle raw diff |
--- a/config/environment.rb
+++ b/config/environment.rb
@@ -5,7 +5,7 @@
# ENV['RAILS_ENV'] ||= 'production'
# Specifies gem version of Rails to use when vendor/rails is not present
-RAILS_GEM_VERSION = '2.0.1' unless defined? RAILS_GEM_VERSION
+RAILS_GEM_VERSION = '2.0.2' unless defined? RAILS_GEM_VERSION
# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')
@@ -38,7 +38,7 @@ Rails::Initializer.run do |config|
# no regular words or you'll be exposed to dictionary attacks.
config.action_controller.session = {
:session_key => '_rails-skeleton_session',
- :secret => 'd621ee17b00e1f40f6e23159735767aa4b06587e6380e8d9b153ef23a281b23d93ff52a8825e0c453d753affcbe6fedb3c71244cadfca9c8a80f1820fc455592'
+ :secret => '4c57d67aebd343f26e4aa5186143c5ae44fd1b2dbec93c63c6300a66d27744d67220e68ef74a7aa261b8078eac05982dec989c6d57955c3343a0b0f89fb5d662'
}
# Use the database for sessions instead of the cookie-based default, |
| |   |
| 10 | 10 | # Full error reports are disabled and caching is turned on |
| 11 | 11 | config.action_controller.consider_all_requests_local = false |
| 12 | 12 | config.action_controller.perform_caching = true |
| 13 | config.action_view.cache_template_loading = true |
| 13 | 14 | |
| 14 | 15 | # Enable serving of images, stylesheets, and javascripts from an asset server |
| 15 | 16 | # config.action_controller.asset_host = "http://assets.example.com" |
| toggle raw diff |
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -10,6 +10,7 @@ config.cache_classes = true
# Full error reports are disabled and caching is turned on
config.action_controller.consider_all_requests_local = false
config.action_controller.perform_caching = true
+config.action_view.cache_template_loading = true
# Enable serving of images, stylesheets, and javascripts from an asset server
# config.action_controller.asset_host = "http://assets.example.com" |