<?xml version="1.0" encoding="UTF-8"?><!-- generator="WordPress/2.8.4" -->
<rss version="0.92">
<channel>
	<title>dan.thoughts</title>
	<link>http://blog.sosedoff.com</link>
	<description>Web-development, PHP, Ruby, Sinatra, Merb, Rails, MySQL, SQLite, Web Services.</description>
	<lastBuildDate>Wed, 25 Jan 2012 18:54:45 +0000</lastBuildDate>
	<docs>http://backend.userland.com/rss092</docs>
	<language>en</language>
	
	<item>
		<title>Adding code revision header to your apps</title>
		<description>Sometimes its necessary to have a code revision tag somewhere on the website. Use cases are usually different and vary from just checking against the current revision, automatic upgrades and such. 

If you're rolling deployments with capistrano, it will insert the REVISION file under the app's root dir with git ...</description>
		<link>http://blog.sosedoff.com/2012/01/25/adding-code-revision-header-to-your-apps/</link>
			</item>
	<item>
		<title>Using capistrano-unicorn with multistage environment</title>
		<description>Awhile ago i create a capistrano-unicorn plugin for Capistrano that allows you to deploy your rails application using Unicorn. It works fine until you define multiple stages in your deployment configuration. 

The issue - capistrano loads default configuration and then executes your staging task and overrides previously defined variables. Default ...</description>
		<link>http://blog.sosedoff.com/2012/01/21/using-capistrano-unicorn-with-multistage-environment/</link>
			</item>
	<item>
		<title>Homebrew upgrade failure fix</title>
		<description>If you have an old homebrew installation, upgrade method for package will fail with something like this:


Error: undefined method `include?' for nil:NilClass
Please report this bug:
    https://github.com/mxcl/homebrew/wiki/checklist-before-filing-a-new-issue
/usr/local/Library/Homebrew/formula.rb:417:in `canonical_name'
/usr/local/Library/Homebrew/formula.rb:449:in `factory'
/usr/local/Library/Contributions/examples/brew-upgrade.rb:7
/usr/local/Library/Contributions/examples/brew-upgrade.rb:7:in `map'
/usr/local/Library/Contributions/examples/brew-upgrade.rb:7
/usr/local/bin/brew:47:in `require'
/usr/local/bin/brew:47:in `require?'
/usr/local/bin/brew:80


This happens because of old brew-update command. Pretty annoying, so to fix it just run the following ...</description>
		<link>http://blog.sosedoff.com/2012/01/19/homebrew-upgrade-failure-fix/</link>
			</item>
	<item>
		<title>Deploying Rails application with Capistrano and Unicorn</title>
		<description>I've been switching all my new applications to Unicorn (nginx+unicorn) from Passenger (nginx+passenger). Passenger comes with an extension to nginx and needs to be compiled with nginx as a plugin. That requires additional maintenance on server and not a good idea in general when having more that just 1 ruby ...</description>
		<link>http://blog.sosedoff.com/2011/10/23/deploying-rails-application-with-capistrano-and-unicorn/</link>
			</item>
	<item>
		<title>Capistrano MySQL Backups for Rails</title>
		<description>If you need to backup your application before each deployment, here is the small manual. 
 
Capistrano versions: >= 2.5 
 
Configuration 
 
First, you need to define application environment: 
 

# Define server-side rails environment
set :rails_env, "production"

# Primary deployment location
set :deploy_to, "/home/#{user}/#{application}"

# Place where all backups will be dumped
set ...</description>
		<link>http://blog.sosedoff.com/2011/08/10/capistrano-mysql-backups-for-rails/</link>
			</item>
	<item>
		<title>Processing emails with Postfix and Rails</title>
		<description>This is a short manual on how to setup postfix and rails application to receive and process email messages. 
 
Stack: 
 
 
Debian / Ubuntu Server 
Postix 
Ruby 1.9 
Rails 3.0 
 
 
 
Overview 
 
You have an application where users get email notifications. And you want to ...</description>
		<link>http://blog.sosedoff.com/2011/08/10/processing-emails-with-postfix-and-rails/</link>
			</item>
	<item>
		<title>Foreman + Capistrano for Rails 3 applications</title>
		<description>Foreman is a Procfile based process spawner.
Source: https://github.com/ddollar/foreman
Installation
gem install foreman

Configuration
Lets assume you have a resque worker, which you execute with rake:
bundle exec rake resque:work QUEUE=* RAILS_ENV=production

Now, you will need to create a Procfile inside your rails root folder (Procfile):

worker: bundle exec rake resque:work QUEUE=* RAILS_ENV=production


Start your workers with foreman:

foreman start



Foreman ...</description>
		<link>http://blog.sosedoff.com/2011/07/24/foreman-capistrano-for-rails-3-applications/</link>
			</item>
	<item>
		<title>Serving maintenance page with Rack Middleware</title>
		<description>Its not that important to show message while doing a regular app update, which takes seconds to complete, but when you need to perform some maintenance tasks (tuning, configuration, installation) its better to give users information when its going to be finished. All big websites have their own fancy maintenance ...</description>
		<link>http://blog.sosedoff.com/2011/04/09/serving-maintenance-page-with-rack-middleware/</link>
			</item>
	<item>
		<title>Restrict access to all mobile and bot clients with Rack Middleware</title>
		<description>Rack middleware is a convenient way to process request before it gets to the application level. Of course, a lot of tasks might be performed within the app, but its not even necessary to do so. Since every ruby web framework is based on rack it makes sense to handle ...</description>
		<link>http://blog.sosedoff.com/2011/04/09/restrict-access-to-all-mobile-and-bot-clients-with-rack-middleware/</link>
			</item>
	<item>
		<title>Dynamic settings for Ruby/Rails applications</title>
		<description>Few times i needed to build dynamic-settings support into the application, which means that users (admins) can redefine website parameters like html keywords, notification email adresses and other simple data, that cannot be put into application environment settings. So, i extracted a small helper that will give me such ability ...</description>
		<link>http://blog.sosedoff.com/2011/02/07/dynamic-settings-for-ruby-or-rails-applications/</link>
			</item>
</channel>
</rss>

