Technology Errors

git: Error: Some Local Refs Could Not Be Updated; Try Running ‘git remote prune origin’ To Remove Any Old, Conflicting Branches

Lately I have been working on a Ruby project that has a bunch of different branches that various developers are working on. One of the development servers has multiple virtual hosts and at certain points in the code release cycle the various virtual hosts could be completely split from the main branch of Ruby code either because of a bug fix, a specific feature, or any number of other reasons. The other night I needed to bring one of the virtual hosts to a near production release to test some features of a product that uses the web application to record data and when I attempted to “git pull” I received an error which is described in detail below along with what I ended up doing to resolve the problem.

Code Snippets

Shell Script To Configure A Read Only User On A PostgreSQL Database

**UPDATE: New article here.

Its a little more complicated to create a read only database user with PostgreSQL than say using something like MySQL. You will need to grant select access on each table in the database for the read only user. Keep in mind that each time you add a new table you will need to either run the shell script below again or manually grant select access on the new table for the read only user.

Technology Errors

WordPress File Upload Error: The uploaded file could not be moved to

When attempting to upload files via the WordPress admin to your blog you might receive the below error. This error can be caused for a couple different reasons of which the main reason relates to permissions. Resolving the issue is a security risk but depending on how convenient you want it to be to upload files will depend on if you should use the WP admin or if you should just FTP the files to your blog site.

Error: WordPress File Upload Error: The uploaded file could not be moved to /wordpress/root/wp-content/uploads/2009/04

Below I list two different causes and resolutions for each one.