I18n for Rails 3 and common gems

Part One: Discussion [Update] (2010-09-16): "Entries to assist translators":#update_1 Part Two: Quick Reference You're building a Rails 3 app. It needs to support internationalization (I18n). No problem. Rails 3 supports internationalization. You can use translate(key) or t(key). %h2= t('hello') It looks up the key in config/locales/en.yml: en: ...

Categories for your GitHub Pages (Jekyll)

You, like me, have a github pages powered blog. You, like me, are contemplating switching to WordPress for tags/categories. Fret no more. I added categories to my github pages powered blog today. You can too. Just assign a yaml list to categories in your page meta: categories: - ruby - rvm Listing and linking to them was harder than I expected. I was f...

Email causing SocketError on Heroku?

Getting a SocketError while sending emails on heroku, using sendgrid? It may be some gmail env vars. While working on a project that I just inherited, we enabled sendgrid for our heroku app. Sending an email raised this error: SocketError (getaddrinfo: Name or service not known) Google searches indicated ActiveMailer configuration issues, but Heroku was...

Rails and PostgreSQL on Snow Leopard using homebrew

Update: 12 May 2010. Updated automatic load instructions. As we have seen in the past, I couldn't find a definitive, accurate install and use guide for PostgreSQL with Rails on Snow Leopard, using homebrew. In the end, it took less work than any of the existing instruction lists (that I found) indicated. Of Note: I did NOT need to make any changes to m...

regex match false? or nil?

We have some scripts we run which are "instrumented" with messages and progress bars. Two issues: # These are muddying up our specs # In production, the progress bars can raise "Broken Pipe" errors (std out issues?). We will probably create some abstraction for this concept, but we started with:      puts "It's working." i...

moonshine, rmagick, and jaunty

h2. Moonshine "Moonshine":moonshine is "rails deployment and configuration management done right. ShadowPuppet + Capistrano == crazy delicious" We are going through a phase of server 'provisioning'. We need a demo server, one for load testing, and an updated ci server. We are also moving some production servers from Windows to Ubuntu. yay! Moonshine e...

script/runner and cron

h2. Intermittent processes We have just started to run some daemon-like processes which check status at various time intervals. We started with a simple ruby script which looped, sleeping between runs. This was quick and easy, and worked fine until the database connection was severed for second. We had a few different issues, all of which were intermit...

blog_engines.detect {|engine| engine.not_engine?}

I wanted to start a blog. I did not want to use a formal engine (too much work) or a dead simple static file system (too lame). Then I found http://pages.github.com/. It was simple, with functionality: for post in site.posts h2. Choose. * http://tom.preston-werner.com/2008/11/17/blogging-like-a-hacker.html * http://github.com/mojombo/tpw/tree/maste...