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:
- 3755 Bytes
1 | # Be sure to restart your web server when you modify this file. |
2 | |
3 | # Uncomment below to force Rails into production mode when |
4 | # you don't control web/app server and can't set it the proper way |
5 | # ENV['RAILS_ENV'] ||= 'production' |
6 | |
7 | # Specifies gem version of Rails to use when vendor/rails is not present |
8 | # RAILS_GEM_VERSION = '1.1.6' |
9 | |
10 | # Bootstrap the Rails environment, frameworks, and default configuration |
11 | require File.join(File.dirname(__FILE__), 'boot') |
12 | |
13 | # Location of application relative to document root in terms of |
14 | # URLs (i.e. according to the web server configuration, not the |
15 | # filesystem location) and location in the filesystem, rather than |
16 | # according to the Web server, of the login indicator icons. |
17 | PATH_PREFIX = ENV['RAILS_RELATIVE_URL_ROOT'] || '' |
18 | LOGIN_ICONS = "#{RAILS_ROOT}/public/images/icons" |
19 | |
20 | Rails::Initializer.run do |config| |
21 | # We don't run in the document root, so images etc. must come from |
22 | # a non-root location too. Hijack the 'asset host' facility to get |
23 | # helper-based links pointing in the right place. |
24 | config.action_controller.asset_host = PATH_PREFIX |
25 | |
26 | # Settings in config/environments/* take precedence those specified here |
27 | |
28 | # Skip frameworks you're not going to use (only works if using vendor/rails) |
29 | # config.frameworks -= [ :action_web_service, :action_mailer ] |
30 | |
31 | # Add additional load paths for your own custom dirs |
32 | # config.load_paths += %W( #{RAILS_ROOT}/extras ) |
33 | |
34 | # Force all environments to use the same logger level |
35 | # (by default production uses :info, the others :debug) |
36 | config.log_level = :warn |
37 | |
38 | # Use the database for sessions instead of the file system |
39 | # (create the session table with 'rake db:sessions:create') |
40 | # config.action_controller.session_store = :active_record_store |
41 | |
42 | # Use SQL instead of Active Record's schema dumper when creating the test database. |
43 | # This is necessary if your schema can't be completely dumped by the schema dumper, |
44 | # like if you have constraints or database-specific column types |
45 | # config.active_record.schema_format = :sql |
46 | |
47 | # Activate observers that should always be running |
48 | # config.active_record.observers = :cacher, :garbage_collector |
49 | |
50 | # Make Active Record use UTC-base instead of local time |
51 | # config.active_record.default_timezone = :utc |
52 | |
53 | # See Rails::Configuration for more options |
54 | end |
55 | |
56 | # Add new inflection rules using the following format |
57 | # (all these examples are active by default): |
58 | # Inflector.inflections do |inflect| |
59 | # inflect.plural /^(ox)$/i, '\1en' |
60 | # inflect.singular /^(ox)en/i, '\1' |
61 | # inflect.irregular 'person', 'people' |
62 | # inflect.uncountable %w( fish sheep ) |
63 | # end |
64 | |
65 | # Include your application configuration below |
66 | |
67 | # Allow multiple Rails applications on this host by giving the session |
68 | # cookie a unique prefix. |
69 | |
70 | ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:session_key] = 'hubapp_session_id' |
71 | |
72 | # Ensure ActiveRecord does something sensible with timezones. By |
73 | # default it rather surprisingly works in local time. |
74 | |
75 | ActiveRecord::Base.default_timezone = :utc |
76 | |
77 | # HUB CONFIGURATION |
78 | # ================= |
79 | |
80 | # Administrator e-mail address to use as the 'From' address in |
81 | # account notification e-mail messages. |
82 | EMAIL_ADMIN = 'info@riscosopen.org' |
83 | |
84 | # Prefix to use in subject lines of account notification e-mail |
85 | # messages, including trailing spaces if you want a space between |
86 | # your prefix and the subject text. |
87 | EMAIL_PREFIX = '[ROOL Hub] ' |
88 | |
89 | # Hostname to use in notification messages. The PATH_PREFIX and |
90 | # controller/action data will be appended to it. |
91 | EMAIL_HOST = 'www.riscosopen.org' |
92 | |
93 | # Time limit, *in seconds*, for password reset e-mail codes. The |
94 | # codes persist in the database indefinitely but will be rejected |
95 | # if too old when someone tries to use one. |
96 | RESET_TIME_LIMIT = 2 * 24 * 60 * 60 |