Bugfixes and Rails Edge
Update to Rails 2.3.1. (Actually, not quite. Doesn't look like 2.3.1 will be released today, but I REALLY want to push these bugfixes out.) Removed bundled Rack (Rails 2.3.1 comes bundled with Rack 1.0). Add config.action_view.cache_template_loading = true to production environment. Fix FastCGI bug (http://rubyforge.org/tracker/index.php?func=detail&aid=24191&group_id=186&atid=783). Fix WikiWords bug (http://rubyforge.org/pipermail/instiki-users/2009-February/001181.html).
This commit is contained in:
parent
0ddef97328
commit
133c21b801
641 changed files with 20541 additions and 71675 deletions
|
@ -37,6 +37,7 @@ ARGV.clone.options do |opts|
|
|||
opts.on("-e", "--environment=name", String,
|
||||
"Specifies the environment to run this server under (test/development/production).",
|
||||
"Default: production") { |v| options[:environment] = v }
|
||||
opts.on("-P", "--path=/path", String, "Runs Instiki mounted at a specific path.", "Default: /") { |v| options[:path] = v }
|
||||
|
||||
opts.separator ""
|
||||
|
||||
|
@ -55,7 +56,7 @@ unless server
|
|||
end
|
||||
|
||||
puts "=> Booting #{ActiveSupport::Inflector.demodulize(server)}"
|
||||
puts "=> Rails #{Rails.version} application starting on http://#{options[:Host]}:#{options[:Port]}"
|
||||
puts "=> Rails #{Rails.version} application starting on http://#{options[:Host]}:#{options[:Port]}#{options[:path]}"
|
||||
|
||||
%w(cache pids sessions sockets).each do |dir_to_make|
|
||||
FileUtils.mkdir_p(File.join(RAILS_ROOT, 'tmp', dir_to_make))
|
||||
|
@ -88,11 +89,20 @@ else
|
|||
inner_app = ActionController::Dispatcher.new
|
||||
end
|
||||
|
||||
if options[:path].nil?
|
||||
map_path = "/"
|
||||
else
|
||||
ActionController::Base.relative_url_root = options[:path]
|
||||
map_path = options[:path]
|
||||
end
|
||||
|
||||
app = Rack::Builder.new {
|
||||
use Rails::Rack::LogTailer unless options[:detach]
|
||||
use Rails::Rack::Static
|
||||
use Rails::Rack::Debugger if options[:debugger]
|
||||
run inner_app
|
||||
map map_path do
|
||||
use Rails::Rack::Static
|
||||
run inner_app
|
||||
end
|
||||
}.to_app
|
||||
|
||||
puts "=> Call with -d to detach"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue