From 45e59c8a51a152d5f0b915924d2862d737b71c75 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 26 Mar 2006 03:29:09 +0000 Subject: Dont require rake to run the server, just have a little undryness instead (closes #4213) [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4037 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/lib/commands/server.rb | 8 ++------ railties/lib/tasks/tmp.rake | 5 +---- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/railties/lib/commands/server.rb b/railties/lib/commands/server.rb index c9627439e8..82a3e1083f 100644 --- a/railties/lib/commands/server.rb +++ b/railties/lib/commands/server.rb @@ -1,4 +1,5 @@ require 'active_support' +require 'fileutils' begin require_library_or_gem 'fcgi' @@ -25,10 +26,5 @@ else puts "=> Booting lighttpd (use 'script/server webrick' to force WEBrick)" end -require_library_or_gem 'rake' -load File.join(File.dirname(__FILE__), "..", "tasks", "tmp.rake") -begin - Rake::Task['tmp:create'].execute -rescue Errno::EEXIST => e -end +FileUtils.mkdir_p(%w( tmp/sessions tmp/cache tmp/sockets )) require "commands/servers/#{server}" diff --git a/railties/lib/tasks/tmp.rake b/railties/lib/tasks/tmp.rake index 70298687f9..643b67e6ec 100644 --- a/railties/lib/tasks/tmp.rake +++ b/railties/lib/tasks/tmp.rake @@ -4,10 +4,7 @@ namespace :tmp do desc "Creates tmp directories for sessions, cache, and sockets" task :create do - FileUtils.mkdir "tmp" - FileUtils.mkdir "tmp/sessions" - FileUtils.mkdir "tmp/cache" - FileUtils.mkdir "tmp/sockets" + FileUtils.mkdir_p(%w( tmp/sessions tmp/cache tmp/sockets )) end namespace :sessions do -- cgit v1.2.3