+45 70 27 40 08

sales@meeho.net

» Fixing the "NoMethodError: undefined method ‘to_sym’ for false:FalseClass" error when working with I18n in Ruby on Rails

Posted by Kasper Tidemann on Monday 14th of February 2011 06:20:03 PM

If you are in the middle of setting up internationalization in your brand spanking new Ruby on Rails project, you might have added a few locales including a Norwegian one for those lovely people up in northern Scandinavia.

Now, having done this, trying to call <%= I18n.t(‘hello_world’) %>, you might receive the following error:

NoMethodError: undefined method `to_sym’ for false:FalseClass

You look in your YAML files, say en.yml and no.yml, and what you have is this:

# English locale file:

en:
  hello_world: ‘Hello world!’

… and…

# Norwegian locale file:

no:
  hello_world: ‘Hej verden!’

The above is a classical YAML thing: the no: contained in the no.yml file is interpreted as a boolean, and this renders the Norwegian YAML file useless — and thus, your dandy I18n attempts bork up.

The solution is simple:

# Norwegian locale file:

"no":
  hello_world: ‘Hej verden!’

Escape the no: with quotation marks and you’re good to go.

2

Comment on this post

» Soon to come: IMAP integration

Posted by Kasper Tidemann on Thursday 3rd of February 2011 02:02:13 AM

We’re doing the final testing of our brand new IMAP module for Meeho!™. In short, it’ll give you complete integration of your e-mail inbox, sent mails etc. with contacts, clients, and projects in Meeho!™. We honestly can’t wait to release version 2.2 on the new server platform, packed with new features — it’s gonna be sweet.

0

Comment on this post

» Meeho!™ App version 1.0.3 is out!

Posted by Kasper Tidemann on Thursday 27th of January 2011 01:24:09 AM

Just a quick tip: Meeho!™ App version 1.0.3 is out and available as a free upgrade. Go get it while it’s fresh off the software press!

0

Comment on this post

» Cool new iPad stand

Posted by Kasper Tidemann on Wednesday 26th of January 2011 04:56:35 PM

I spoke to the guys from HiPPiH today, and they gave me one of their cool new iPad stands (it works with iPhones too). It’s not for sale yet, but will be soon, hopefully. It looks really sleek having it standing on a table at the office like this:

2

Comment on this post

 
OLDER POSTS

+45 70 27 40 08
Open office hours

info@meeho.net

support@meeho.net

News from the Meeho!™ Blog:

02/14 2011 » Fixing the "NoMethodError: undefined method ‘to_sym' for false:FalseClass" error when working with I18n in Ruby on Rails

02/03 2011 » Soon to come: IMAP integration

01/27 2011 » Meeho!™ App version 1.0.3 is out!

01/26 2011 » Cool new iPad stand

We live at Diplomvej 381, 2800 Kgs. Lyngby, Denmark: