My First Time

I have Perl and PHP experience. I love the idea of true OO and wanted
to give Ruby a try. I expect gem to work like cpan and pear.

I want to use a very simple API to get data and dump into a local
database. I have Windows XP SP 3. I installed Ruby 1.9.2 and Eclipse
and the DLT for Ruby (I’ve also installed MySQL, but I haven’t gotten
that far, yet).

There are three different gems out there that I could use. I’m trying
‘reve’. It required ‘hpricot’.

That too two hours just to get ‘gem install hpricot’ to work. I finally
got some sort of Ruby DevKit installed, and hpricot installed and so did
reve, without error.

Now, when I try

require ‘reve’
api = Reve::API.new(‘my_userid’,‘my_apikey’)
api.characters.each do |character|
puts character.name
end

I get

C:/Ruby192/lib/ruby/gems/1.9.1/gems/reve-0.0.131/lib/reve.rb:136:in
read': No such file or directory - C:/Ruby192/lib/ruby/gems/1.9.1/gems/reve-0.0.131/lib/../VERSION (Errno::ENOENT) from C:/Ruby192/lib/ruby/gems/1.9.1/gems/reve-0.0.131/lib/reve.rb:136:ininitialize’
from C:/Documents and Settings/Travis/workspace/ODNDT Transaction
Farmer/test1.rb:5:in new' from C:/Documents and Settings/Travis/workspace/ODNDT Transaction Farmer/test1.rb:5:in

Clearly, I’ve done something wrong in installing this gem.

Like I said, I’m completely new to Ruby. Yes, there is probably
something I could read somewhere, but I haven’t found it today. I
understand that I’m crashing into Ruby, but… I don’t want to do ‘hello
world’.

On Oct 15, 2010, at 8:47 PM, Travis T. [email protected]
wrote:

require ‘reve’
api = Reve::API.new(‘my_userid’,‘my_apikey’)
api.characters.each do |character|
puts character.name
end

require “rubygems”

Before reve and it should load.

On Sat, Oct 16, 2010 at 10:58 AM, Ryan D. [email protected]
wrote:

require “rubygems”

Before reve and it should load.

rubygems should required by default under 1.9, what the OP seems to be
using. There’s probably something else going wrong here.

Regards,
Ammar

Travis T. wrote in post #954723:

require ‘reve’
api = Reve::API.new(‘my_userid’,‘my_apikey’)
api.characters.each do |character|
puts character.name
end

I get

C:/Ruby192/lib/ruby/gems/1.9.1/gems/reve-0.0.131/lib/reve.rb:136:in
read': No such file or directory - C:/Ruby192/lib/ruby/gems/1.9.1/gems/reve-0.0.131/lib/../VERSION (Errno::ENOENT) from C:/Ruby192/lib/ruby/gems/1.9.1/gems/reve-0.0.131/lib/reve.rb:136:in initialize’

Clearly, I’ve done something wrong in installing this gem.

I think it’s a problem with the gem itself. It’s looking for a file
C:/Ruby192/lib/ruby/gems/1.9.1/gems/reve-0.0.131/VERSION and can’t find
it.

Some gems are not compatible with ruby 1.9.x, and some are not
compatible with Windows.

http://www.crudvision.com/reve-ruby-eve-online-api-library/ was last
updated July 2007, although the ChangeLog in SVN has an entry from
2008-01-13. So maybe it falls into the “needs modification to work with
1.9” camp.

If you’re “crashing into Ruby”, this is as good a place to start as any
:slight_smile:

Start at reve.rb line 136, work out what it’s doing, fix it. Maybe for
now just create the VERSION file that it’s looking for.

Having said that, looking in Subversion I don’t see any attempt to open
VERSION, so maybe this has been fixed already, and you just need to
build a more up-to-date gem (or install directly from SVN).
http://svn.crudvision.com/reve/trunk/lib/reve.rb

But also, maybe the repo has moved - that one shows revision r117, but
your gem claims to be r131. Maybe it’s somebody else’ fork.

Wow, thank you guys for the support. As I said, I’m used to Perl, so
I’m used to… less than warm responses.

I did dig around in the reve.rb. But fixing that line, just uncovered
another problem and another. I decided to try one of the other two
packages. I was able to get eve-api to work with only two edits to the
code.

I just thought I was installing them wrong or something.

On Sat, Oct 16, 2010 at 4:24 PM, Josh C. [email protected]
wrote:

I let her know that the VERSION file wasn’t getting into the gem, and
she
fixed it and pushed up version 0.0.132

On Sat, Oct 16, 2010 at 3:52 AM, Brian C. [email protected]
wrote:

Travis T. wrote in post #954723:
http://www.crudvision.com/reve-ruby-eve-online-api-library/ was last
updated July 2007, although the ChangeLog in SVN has an entry from
2008-01-13. So maybe it falls into the “needs modification to work with
1.9” camp.

The one on github (GitHub - lisa/reve: Reve is a Ruby-based library for use with interfacing with the Eve Online API. the one linked to by
rubygems) was updated on the third, and has a 1300 line test file. It
looks
like she added the version thing to the code on August 22
Add a version to Reve, reading from ./VERSION. (Now to remember to up… · lisa/reve@1254c3c · GitHub

For whatever reason it doesn’t download the VERSION file with the gem
install command. I don’t know why, it looks like it is in what I assume
is
the manifest (I’ve never successfully made a gem, so not experienced
enough
to say)

If the eve gem doesn’t work out, reve might be worth another look. Might
even be able to bug them to help you :slight_smile: She would probably enjoy that
someone is interested in their work more than be annoyed that they have
to
explain it.

Anyway, I don’t think she is on 1.9.2, because there are a few places
she
uses relative paths, but I ran the test file (
reve/test/test_reve.rb at master · lisa/reve · GitHub), and they all
basically passed.