Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 226
- Log:
When running Rake tasks, the use of PATH_PREFIX in routes.rb causes
problems. The routes get parsed but unless RAILS_RELATIVE_URL_ROOT is
set in the environment, they fail because PATH_PREFIX ends up 'nil'
and you can't add 'nil' to a string. Up until now I've just set the
environment variable to an empty string (any defined value will do)
and started again, but this is pretty stupid. A far simpler approach
is to just define PATH_PREFIX to an empty string if the enviroment
variable is missing, allowing rake tasks to run without extra work.Modified environment.rb to do this in all cases, including patching
old applications that aren't used, in case they're ever used again.
- Author:
- rool
- Date:
- Wed Jun 13 18:00:17 +0100 2007
- Size:
- 2277 Bytes
1 | # Be sure to restart your webserver when you modify this file. |
2 | |
3 | # Uncomment below to force Rails into production mode |
4 | # (Use only when you can't set environment variables through your web/app server) |
5 | # ENV['RAILS_ENV'] = 'production' |
6 | |
7 | # Bootstrap the Rails environment, frameworks, and default configuration |
8 | require File.join(File.dirname(__FILE__), 'boot') |
9 | |
10 | # Location of application relative to document root in terms of |
11 | # URLs (i.e. according to the web server configuration, not the |
12 | # filesystem location). |
13 | PATH_PREFIX = ENV['RAILS_RELATIVE_URL_ROOT'] || '' |
14 | |
15 | Rails::Initializer.run do |config| |
16 | # We don't run in the document root, so images etc. must come from |
17 | # a non-root location too. Hijack the 'asset host' facility to get |
18 | # helper-based links pointing in the right place. |
19 | config.action_controller.asset_host = PATH_PREFIX |
20 | |
21 | # Skip frameworks you're not going to use |
22 | config.frameworks -= [ :action_web_service, :action_mailer ] |
23 | |
24 | # Force all environments to use the same logger level |
25 | # (by default production uses :info, the others :debug) |
26 | config.log_level = :warn |
27 | |
28 | # Add additional load paths for your own custom dirs |
29 | config.load_paths += %W( #{RAILS_ROOT}/app/cachers ) |
30 | |
31 | # Force all environments to use the same logger level |
32 | # (by default production uses :info, the others :debug) |
33 | # config.log_level = :debug |
34 | |
35 | # Only include the connection adapters you're actually going to use |
36 | # config.connection_adapters = %w( mysql postgresql sqlite sqlserver db2 oci ) |
37 | |
38 | # Use the database for sessions instead of the file system |
39 | # (create the session table with 'rake create_sessions_table') |
40 | # config.action_controller.session_store = :active_record_store |
41 | |
42 | # Enable page/fragment caching by setting a file-based store |
43 | # (remember to create the caching directory and make it readable to the application) |
44 | # config.action_controller.fragment_cache_store = :file_store, "#{RAILS_ROOT}/cache" |
45 | |
46 | config.active_record.observers = :page_title_cache |
47 | |
48 | # Make Active Record use UTC-base instead of local time |
49 | # config.active_record.default_timezone = :utc |
50 | |
51 | # See Rails::Configuration for more options |
52 | end |
53 | |
54 | # Application configuration - use a unique session cookie |
55 | |
56 | ActionController::Base.session_options[:session_key] = 'i2app_session_id' |