search for: f_content

Displaying 1 result from an estimated 1 matches for "f_content".

Did you mean: _content
2006 Apr 21
9
Capistrano, OS X
...repository. #!/usr/bin/env ruby current_path = ARGV[0] new_hashbang = ARGV[1] f_names = %w(dispatch.cgi dispatch.rb dispatch.fcgi) f_names.each do |name| puts `ls -al "#{current_path}/public/#{name}" ` File.open("#{current_path}/public/#{name}", "r+") do |f| f_contents = f.read f_contents.gsub!(/^#!.+$/, new_hashbang) f.rewind f.write(f_contents) end end Add the following in deploy.rb, with the path to ruby on your production server in the second argument: task :before_restart do run "#{current_path}/script/fix_hashbangs.rb #{current_path...