September 18th, 2009 by Graeme Nelson
For the last month, I’ve been hard at work with Tim Barkow to launch HeyIndie. We are close to launching our first version, you can read more about it over at the HeyIndie Blog.
What I’ve really enjoyed about this project was the ability to step outside the technology realm and dive into the customer realm. Tim and I both stumbled up Steven Blank book The Four Steps to the Epiphany at the same time. I am not sure how Steven Blank stayed under my radar for so long. I’ve always considered myself a champion for the customer, but it wasn’t until I started reading the book and articles by Steven Blank that I realized that I really wasn’t, since I never got outside of the building to talk with the customer.
If you haven’t read Steve Blank, I highly recommend it. It will definitely make you think in different ways, when building an application or starting a startup.
August 13th, 2009 by Graeme Nelson
I started using i18n support in rails. I really liked how the ActionView::Helpers::TranslationHelper#translate method works.
If the key starts with “.”, then the key is scoped to the partial. For example, if translate(”.title”) is called from the registrations/new page, then the key gets scoped to ‘registrations.new.title’. I wanted the same sort of behavior with the ActionController::Translation#translate, so I created my own method called scope_key_by_controller_and_action and placed it in the ApplicationController. The code looks like:
def scope_key_by_controller_and_action( key )
return key unless key.first == "."
"#{controller_name}.#{action_name}#{key}"
end
Then I could use it with the ActionController::Translation#translate method, like so:
def page_title
@page_title ||=
t( scope_key_by_controller_and_action(".title") )
end
The scope_key_by_controller_and_action(”.title”) will be converted to “registrations.new.title” for a controller/action combo of “registrations” and “new”. If the key doesn’t start with “.” then the original key is returned.
August 12th, 2009 by Graeme Nelson
When working with RSpec, I like to run my individual specs with the RSpec Textmate Bundle. After making the switch to using multiruby, the bundle was picking up my old install of ruby. This was easy to fix, at least to run my current 1.8.7 version of ruby from my .multiruby directory.
On my mac, I just opened /etc/profile and added the following line to the bottom of file:
export PATH="/Users/graemenelson/.multiruby/install/1.8.7-p174/bin:$PATH"
My initial attempt was to add /Users/graemenelson/.multiruby/install/1.8.7-p174/bin to the top of the /etc/paths file, but other directories still appeared before my .multiruby directory.
However, this still doesn’t work when I want to switch to using a different ruby version. Does any have any ideas on how to solve this?
August 8th, 2009 by Graeme Nelson
I hope this helps someone else. I decided that I need to get setup with Ruby 1.9, and I found this nice write up.
However, when I typed:
multiruby_setup the_usual
I kept receiving the following error, in my ~/.multiruby/build/ruby-1.8.6-p383/log.build (your directory may vary depending on the patch level for ruby 1.8.6):
readline.c: In function ‘filename_completion_proc_call’
This post pointed me in the right direction, it seems that my installation of readline in /usr/local was causing a conflict. I had just installed that the other day, when I decided to abandoned macports and go /usr/local. I just removed this installation, by going to the source directory (which I still had around) and typing sudo make uninstall. I am not sure if this messed up any of my other libraries, only time will tell.
August 7th, 2009 by Graeme Nelson
I’ve been living a double life with my Mac OS X development environment, the MacPorts life and the /usr/local life.
Why I used MacPorts?
- It’s easy, just type
sudo port install packagename
However, I kept running into more and more situations where MacPorts didn’t really work for me.
- MacPorts seemed to always be behind in revisions. I wanted to use the lastest and greatest.
- MacPorts sometimes failed, and I had to search around for the solution providing special switches. How is this any different than installing from source?
Lately, I started seeing conflicts between /opt/local (MacPorts) and /usr/local. This is when I decided I needed to make a choice between them. I decided to adopted the /usr/local method, since I want to be able to use the latest versions for libraries and software. When I was looking around for posts on the subject, I happened to stumble upon this nice post on why you would want to install your own packages in /usr/local. Justification!
So, today I am starting on that path. I am not sure if it will be successful, but I am giving it a try.
July 30th, 2009 by Graeme Nelson
When I first started checking out CouchDB a couple of months ago, I installed CouchDB via Mac Ports. Everything was working fine, until I decided to try and upgrade couchdb via ports:
sudo port upgrade couchdb
Next thing I knew, Erlang was upgraded to a version that was no longer compatible with CouchDB. So, I tried several different ways to get my old Erlang version back, but with little success. I then decided to try and install all the required packages by hand. I tried a couple of different blog posts, but the one that work for me was:
http://devoh.com/posts/2009/03/couchdb-leopard
July 28th, 2009 by Graeme Nelson
I’ve decided to update my blog software once again. My last attempt was a custom built application, using Sinatra Web Framework. I really enjoyed working with Sinatra and I learned a lot about Sinatra in the process.
So, why change? Well, I wanted to make an update to my blog last week, but I updated my local Sinatra environment to the latest and greatest, and that broke my blog code. I didn’t have the time to spend on fixing the issues. I decided that I needed to move my blog to a mature blog platform, so I can focus on writing blog posts and working on code I really wanted to be working on.
This blog is now running on wordpress.