Posted on 06/21/2008, 6:11 pm, by warren, under
All.
Rails automatically adds the File.mtime to static assets when using stylesheet_link_tag and javascript_include_tag. The file’s mtime is cached to prevent excessive file system access… even in development mode. This is problematic in a Facebook canvas during development mode because often you won’t immediately see the changes you make to your stylesheets and javascripts.
Here [...]
Posted on 06/04/2008, 8:12 pm, by val, under
All,
Ops,
Rails.
Instead of relaying on running cleanup of old releases via capistrano, we have a cron job to only keep releases for last two days (but at least three latest).
#!/usr/bin/env ruby
require ‘fileutils’
KEEP_RELEASES = 3
KEEP_DAYS = 2
EXCLUDE_APPS = %W(uploadr)
cut_time = (Time.now.utc – KEEP_DAYS*24*60*60).strftime("%Y%m%d%H%M%S").to_i
Dir['/u/apps/*'].each do |app|
next if EXCLUDE_APPS.include?(File.basename(app))
dirs = Dir["#{ app }/releases/*"]
fresh [...]
Posted on 06/04/2008, 4:00 pm, by warren, under
All.
Here’s a quick rake file that will crawl through your Rails project and syntax check ruby, erb, and yml files. You should always run this before doing a “cap deploy” and it even doesn’t hurt to run it before a “svn commit”.
require ‘erb’
require ‘open3′
require ‘yaml’
task :check_syntax => [:check_ruby, :check_erb, :check_yaml]
task :check_erb do
(Dir["**/*.erb"] [...]
Posted on 06/04/2008, 3:59 pm, by aaron, under
All.
.thumbnail { padding:12px; float:right}
The Railsconf08 talk on ESI & Rails has sparked some interest in the community, and Todd, the core mongrel-esi maintainer, is asking for feedback on the mongrel-esi mailing list.
The latest rumor is he is working on a nginx port of mongrel-esi, which I have to [...]