# Custom gem doesn't work

**URL:** <https://www.ruby-forum.com/t/custom-gem-doesnt-work/159770>\
**Category:** Rails\
**Created:** [February 8, 2009, 4:22pm UTC](https://www.ruby-forum.com/t/custom-gem-doesnt-work/159770 "2009-02-08T16:22:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cbmeeks](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58f4c7/32.png) [@cbmeeks](https://www.ruby-forum.com/u/cbmeeks)\
**Post date:** [February 8, 2009, 4:22pm UTC](https://www.ruby-forum.com/t/custom-gem-doesnt-work/159770/1 "2009-02-08T16:22:49Z")

</div>

I’m a Ruby/Rails newbie.

I’ve just created my first Ruby gem called GameFake. It’s like Faker  
for video games.

Anyway, the gem works great in the irb. But when I fire up the Rails  
console (./script/console) and try to require ‘gamefake’, I get all  
kinds of syntax errors.

Once again, the code works great in the Ruby console.

The gem can be found here:

> **[GitHub - cbmeeks/gamefake: Inspired from Faker. GameFake generates fake video...](https://github.com/cbmeeks/gamefake/tree/master)**
>
> master

(sorry, not trying to do a shameless plug).

The actual syntax error is in the middle of the “SMS\_Games” array. I’ve  
looked over this array a million times. It’s large but should be ok.

Any suggestions on what I’m doing wrong?

Thanks for any help!

PS, anyone else type Ryby a million times when they are trying to type  
Ruby? lol

---

<div class="post-metadata">

**Author:** ![cbmeeks](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58f4c7/32.png) [@cbmeeks](https://www.ruby-forum.com/u/cbmeeks)\
**Post date:** [February 9, 2009, 4:23pm UTC](https://www.ruby-forum.com/t/custom-gem-doesnt-work/159770/2 "2009-02-09T16:23:03Z")

</div>

The only thing that jumped out at me with that were the missing  
characters - so for instance,  
the accented e in Asterix doesn’t show up correctly on github. Without  
a listing of the ‘all  
kinds of syntax errors’, it’s hard to tell.

BTW, for storing arrays like this, Yaml might be more efficient…

–Matt J.

---

<div class="post-metadata">

**Author:** ![cbmeeks](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58f4c7/32.png) [@cbmeeks](https://www.ruby-forum.com/u/cbmeeks)\
**Post date:** [February 9, 2009, 4:31pm UTC](https://www.ruby-forum.com/t/custom-gem-doesnt-work/159770/3 "2009-02-09T16:31:27Z")

</div>

Matt J. wrote:

> The only thing that jumped out at me with that were the missing  
> characters - so for instance,  
> the accented e in Asterix doesn’t show up correctly on github. Without  
> a listing of the ‘all  
> kinds of syntax errors’, it’s hard to tell.
> 
> BTW, for storing arrays like this, Yaml might be more efficient…
> 
> –Matt J.

That’s a good point. I loaded the array into komoto edit but never  
noticed the accent marks. I will scan the list more thoroughly for  
things like that.

Oh, and good idea on the Yaml tip!

Thanks!!
