Forum: Ruby on Rails Custom gem doesn't work

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
A8ec0dfe7d390e2e91e2fa5d5088fc40?d=identicon&s=25 Cb Meeks (cbmeeks)
on 2009-02-08 16:22
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:
http://github.com/cbmeeks/gamefake/tree/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
6883e5ef03484d4fcef507d7b4f1d243?d=identicon&s=25 Matt Jones (Guest)
on 2009-02-09 16:23
(Received via mailing list)
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 Jones
A8ec0dfe7d390e2e91e2fa5d5088fc40?d=identicon&s=25 Cb Meeks (cbmeeks)
on 2009-02-09 16:31
Matt Jones 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 Jones


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!!
This topic is locked and can not be replied to.