by Calvin on June 25, 2009
A Google search seems to indicate that problems uploading files on WordPress installs is a pretty common occurrence. Unfortunately, I had the hardest time finding the solution to my particular ailment. Hopefully, this post will find those others who run into this problem in the future.
From the WP Admin pages, go to Settings > Miscellaneous. Make sure the value for ‘Store uploads in this folder’ is where you want your files stored (in most cases, it should be wp-content/uploads).

In my case, this was pointing to a folder I was using for a WP install I was using to test the Thesis theme I’m using now. Reverting it to the default fixed my problem.
by Calvin on May 24, 2009
Recently, I needed to create some static reporting pages for Skribit. From a quick search, I got a lot of results that talk about Rails and static pages, but none did exactly what I needed:
- To be able to generate pages with different paths from one URL
- Pages to persist across Rails deployments
Not seeing any solutions that fit my needs, I set out to come up with my own. Here is what I ended up with.
First, I needed to add a route for generating/displaying the reports:
From here, I could just use the standard caches_page :show declaration, but that would only generate the page I wanted if I used /report/2009/05/25 as the URL. What if I wanted /report to generate the report for the current week? Well, you can do something like this:
The magic is in the after_filter method cache_weekly_report. We basically use the same mechanism Rails page caching uses to save our new report page. Now, calling /report will generate a static report at /report/2009/05/25, or whatever the current day is.
The last thing to do is to make sure that the reports persist through new server deployments. That can easily be done with a symlink in your capistrano script:
And that’s it! What do you think? I’d love to know if there are any simpler solutions to this.