aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/request_controller.rb1
-rw-r--r--config/httpd.conf-example (renamed from config/httpd.conf)5
-rw-r--r--config/routes.rb5
-rw-r--r--doc/INSTALL.md4
-rwxr-xr-xscript/mailin2
5 files changed, 12 insertions, 5 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index 4ef36b6d8..a0f88096e 100644
--- a/app/controllers/request_controller.rb
+++ b/app/controllers/request_controller.rb
@@ -1,3 +1,4 @@
+# encoding: UTF-8
# app/controllers/request_controller.rb:
# Show information about one particular request.
#
diff --git a/config/httpd.conf b/config/httpd.conf-example
index e468a1e96..0115ad8d9 100644
--- a/config/httpd.conf
+++ b/config/httpd.conf-example
@@ -50,7 +50,12 @@ RewriteRule ^/request/((\d{1,3})\d*)/(response/\d+/attach/(html/)?\d+/.+) /views
PassengerResolveSymlinksInDocumentRoot on
# Recommend setting this to 3 or less on servers with 512MB RAM
PassengerMaxPoolSize 6
+ # The RackEnv variable applies to Rails 3 applications, while
+ # the RailsEnv variable applies to applicatoins for earlier
+ # versions of Rails. There doesn't seem to be any harm in
+ # setting both, however.
RailsEnv production
+ RackEnv production
</IfModule>
# Gzip font resources
diff --git a/config/routes.rb b/config/routes.rb
index 10f6a3284..1895543d7 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,3 +1,4 @@
+# encoding: UTF-8
# config/routes.rb:
# Mapping URLs to controllers for FOIFA.
#
@@ -51,8 +52,8 @@ Alaveteli::Application.routes.draw do
match '/request/:url_title/describe/:described_state' => 'request#describe_state_message', :as => :describe_state_message
match '/request/:id/response' => 'request#show_response', :as => :show_response_no_followup
match '/request/:id/response/:incoming_message_id' => 'request#show_response', :as => :show_response
- match '/request/:id/response/:incoming_message_id/attach/html/:part/*file_name' => 'request#get_attachment_as_html', :as => :get_attachment_as_html
- match '/request/:id/response/:incoming_message_id/attach/:part(/*file_name)' => 'request#get_attachment', :as => :get_attachment
+ match '/request/:id/response/:incoming_message_id/attach/html/:part/*file_name' => 'request#get_attachment_as_html', :format => false, :as => :get_attachment_as_html
+ match '/request/:id/response/:incoming_message_id/attach/:part(/*file_name)' => 'request#get_attachment', :format => false, :as => :get_attachment
match '/request_event/:info_request_event_id' => 'request#show_request_event', :as => :info_request_event
diff --git a/doc/INSTALL.md b/doc/INSTALL.md
index 37bcec0b6..278aee370 100644
--- a/doc/INSTALL.md
+++ b/doc/INSTALL.md
@@ -359,8 +359,8 @@ It is not recommended to run the website using the default Rails web
server. There are various recommendations here:
http://rubyonrails.org/deploy
-We usually use Passenger / mod_rails. The file at `conf/httpd.conf`
-contains the WhatDoTheyKnow settings. At a minimum, you should
+We usually use Passenger / mod_rails. The file at `conf/httpd.conf-example`
+gives you an example config file for WhatDoTheyKnow. At a minimum, you should
include the following in an Apache configuration file:
PassengerResolveSymlinksInDocumentRoot on
diff --git a/script/mailin b/script/mailin
index 6ed6bc7db..f782df215 100755
--- a/script/mailin
+++ b/script/mailin
@@ -13,7 +13,7 @@ source commonlib/shlib/deployfns
read_conf config/general
-rails runner 'RequestMailer.receive(STDIN.read)' <"$INPUT" >"$OUTPUT" 2>&1
+bundle exec rails runner 'RequestMailer.receive(STDIN.read)' <"$INPUT" >"$OUTPUT" 2>&1
ERROR_CODE=$?
if [ ! "$ERROR_CODE" = "0" ]
then