cmdrkeene / memegen

Two-caption meme generator CLI
https://github.com/cmdrkeene/memegen
MIT License
118 stars 29 forks source link

Uninitialized constant #14

Open alanhogan opened 9 years ago

alanhogan commented 9 years ago

On OS X Yosemite:

~% sudo gem install memegen
# success
~% memegen --list
/Library/Ruby/Gems/2.0.0/gems/memegen-1.0.9/lib/meme_generator/cli.rb:2:in `images': uninitialized constant MemeGenerator (NameError)
    from /Library/Ruby/Gems/2.0.0/gems/memegen-1.0.9/lib/meme_generator/cli.rb:11:in `list_generators'
    from /Library/Ruby/Gems/2.0.0/gems/memegen-1.0.9/bin/memegen:18:in `<top (required)>'
    from /usr/bin/memegen:23:in `load'
    from /usr/bin/memegen:23:in `<main>'
amitailanciano commented 9 years ago

@alanhogan I was having the same issue, I moved:

require "rubygems"
require "meme_generator"

in /Library/Ruby/Gems/2.0.0/gems/memegen-1.0.9/bin/memegen

to just above

require "meme_generator/cli"

and it works now

moribellamy commented 8 years ago

I had the same issue, and @amitailanciano's fix works for me too.