Categories
technology tips

WordTwit finally works

I was finally able to fix my WordTwit plugin problems. I haven’t been able to get my new posts sent to twitter for a while but that’s fixed now.

If you’re trying and nothing appears to happen when you’re clicking the “Add Account” button in the WordTwit accounts area, you need to set a callback url in your Twitter Application settings. Just make it the url of your blog homepage and then you will be able to add an account.

Let’s see if this post gets tweeted right away and what happens after that.  I’ve been experimenting with IFTTT to get around the “add account” problem but now that WordTwit’s working, I think I can go back to my regular workflow.

  1. Email photo to Flickr (post-to-blog address)
  2. Flickr creates blog post
  3. WordTwit tweets about post
  4. Twitter posts to Facebook

This keeps my blog posts being double posted because of the IFTTT tweet-my-post recipe and the WordTwit plugin.

Categories
photography tips

Front window of Flatbread Pizza in Paia

Front window of Flatbread Pizza in Paia

This is the front window of the best pizza place on Maui, Flatbread Pizza

I uploaded this through flickr

Categories
cool photography tips

Eat here if you are visiting Paia, Hawaii

Eat here if you are visiting Paia, Hawaii

Some of the best pizza I’ve ever had. Locally sourced ingredients, wood fired. Sooooooo yummy.

I uploaded this through flickr

Categories
design photography tips

How I processed the Ferry Building waterfront panorama

How I processed the Ferry Building waterfront panorama

Nothing super tricky. The final output might be on the over dramatic side by a little but it looks great on my phone. Plus it reminds me of how Joe McNally’s shots turn out with the high contrast.

I uploaded this through flickr

Categories
note to self programming ruby on rails technology tips work

OSX Passenger prefpane tip

I recently undid all my MacPorts and started using Homebrew for some software on my Macs. That meant uninstalling the Apache MacPort and switching back to the default Snow Leopard version of Apache. Everything went relatively smoothly but today a noticed that my Passenger prefpane wasn’t listing all the Rails sites it had previously been managing.

Turns out it was because in my original install of the prefpane I had used the “ports” version of a required ruby file, per instructions, since I was using the MacPort version of Apache. The easy fix is to just reinstall the prefpane. All of my sites now show up in the site listing and I can add the new site I’m currently developing.

Categories
git note to self programming tips

how to think of “git diff” using branch names

This post is more of a note to myself to remember how to think of certain git diff commands but it might be useful to other newbie-ish users of git. This is from my own experimentation, since I couldn’t find a good newbie-understandable explanation of this on the Interwebs.

git diff <branch name> – means what would change if we applied the current working HEAD of the branch we are on, including all unstaged/uncommitted changes, to the named branch.

git diff <branch 1> <branch 2> – means what would change if we applied <branch 2> onto <branch 1>

Categories
me me me programming ruby on rails tips

Fixing Snarl and autotest_menu in windows

I’ve been trying to get ZenSpider autotest and Windows to play nice for a while. First, I had the problem where autotest would only run once and not stick around waiting for updates to my code. That was fixed by Luke Pearce. He commented on a previous post with his fix and I can confirm that it works. Thanx Luke!

I encountered another problem now. When I ran my autotest but tried to shut it down by hitting Control-C twice in a row, the tests would just reset and run again. Double Control-C is supposed to interrupt the process and allow me to shut it down. This it did not do.

Categories
me me me programming ruby on rails tips

Turning off the Rails 2.3.2 BacktraceCleaner

I had a situation today where, when running some functional tests, the error backtrace being displayed was not helpful at ALL. I was defining a layout for a controller as a symbol instead of a string like I should have been using. You use a string when you are just saying “Use this layout” and you use a symbol when you have a method to call that responds with the layout to use. The error I was getting was …

NoMethodError: undefined method `admin' for #<Admin::RegistrationsController>

but what was the first line that came up in the backtrace?

app/controllers/admin/registrations_controller.rb:18:in `show'

This was giving me fits. There’s no call to ‘admin’ in the ‘show’ method. I knew there had to be something else so I searched for how to see more of the backtrace.

The BacktraceCleaner introduced in Rails 2.3.2 cleans out backtrace lines coming from the Rails framework (Railties, etc). This is usually what you want. However, I was sure that my error was coming from somewhere in the framework. Turns out it’s really simple to turn off the backtrace cleaner. Add this line in a ‘setup’ method in your test_helper.rb file.

Rails.backtrace_cleaner.remove_silencers!

Very simple, very easy. My name is Chef Tell. 🙂

Categories
programming ruby on rails tips

Rails 2.3.2 and testing with assert_select_email

I upgraded a project to Rails 2.3.2 a while back and have been getting the following error when running some unit tests…

NoMethodError: undefined method `assert_select_email' for #<UserMailerTest>

I posted to the rubyonrails-talk google group but never got a response, and I was not the first to post about this problem to that group. However I found someone else commenting on this in an rspec lighthouse ticket and they’d fixed it for their setup. It was an easy conversion to non-rspec and here’s the line you need to add to your test/test_helper.rb file

include ActionController::Assertions::SelectorAssertions

I’m not sure why it’s broken but it appears to have regressed in one of the Rails 2.3.2 RCs.

Categories
technology tips

Upgrade your Flash Player

FlashDue to a security hole, Adobe is recommending people upgrade their Flash Player. Go here to see what version you are running. If your player version doesn’t match the version listed on this page, then you need to upgrade your flash player.