3

I am using the carmen gem and following the instructions there. When I execute these statements:

require 'carmen'
include Carmen

us = Country.named('United States')

I get a

NameError: uninitialized constant Country

even though I have required and included Carmen. require returns true and include returns Object

0xSina
  • 20,973
  • 34
  • 136
  • 253

1 Answers1

0

The reason is that the Github source and documentation you're seeing is for the latest unreleased version. Put this in your Gemfile instead:

gem "carmen", :git => "git://github.com/jim/carmen.git", :branch => "master"

It's probably best to go to Rubygems and subscribe to the library for updates too, as it's not great to have to rely on an untagged branch in a project.

ian
  • 12,003
  • 9
  • 51
  • 107
  • @sscirrus Since this answer and the question were written, [version 1.0.0 has been released (and a subsequent version)](http://rubygems.org/gems/carmen). Use that. – ian Sep 16 '14 at 19:19