Ruby carmen 'NameError'
I am using carmen gem and following instructions. When I execute these statements:
require 'carmen'
include Carmen
us = Country.named('United States')
I get
NameError: uninitialized constant Country
although I demanded and included Carmen
. require
returns true
and include
returnsObject
+3
source to share
1 answer
The reason is that the source and Github documentation you see is for the latest unreleased version. Put this in your Gemfile instead:
gem "carmen", :git => "git://github.com/jim/carmen.git", :branch => "master"
It is most likely best to switch to Rubygems and subscribe to the library for updates as well, since you shouldn't rely on an untagged branch in a project.
0
source to share