# New to ruby, have a question

**URL:** <https://www.ruby-forum.com/t/new-to-ruby-have-a-question/176814>\
**Category:** Ruby\
**Created:** [October 6, 2009, 4:56pm UTC](https://www.ruby-forum.com/t/new-to-ruby-have-a-question/176814 "2009-10-06T16:56:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![martinmike2](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ba8739/32.png) [@martinmike2](https://www.ruby-forum.com/u/martinmike2)\
**Post date:** [October 6, 2009, 4:56pm UTC](https://www.ruby-forum.com/t/new-to-ruby-have-a-question/176814/1 "2009-10-06T16:56:36Z")

</div>

Hello,

I am trying to put together a RoR app using the REVE gem for the  
online game EVE.  
My problem is that I am getting the Stringify Keys error.

###### 

CODE

###### 

char\_sheet.erb.html

\<% require ‘reve’ %\>  
\<%= session[:char\_id] %\>  
\<% api = Reve::API.new(session[:eve\_id], session[:eve\_key]) %\>  
\<% sheet = api.character\_sheet(session[:char\_id]) %\>  
  
  
\<% puts “My name is #{sheet.name}, I belong to the #  
{sheet.corporation\_name} corp and I have #{sheet.balance} ISK” %\>  
  
  
\<% puts “My skills are thus:” %\>  
  
  
\<%= for skill in sheet.skills  
puts “typeID #{skill.id} is at level #{skill.level}.”  
end  
%\>

get\_char\_list

\<% require ‘reve’  
api = Reve::API.new(session[:eve\_id], session[:eve\_key]) %\>

Please select the character you wish to see. Current Server Time: \<% api.current\_time %\>
\<% api.characters.each do |character| %\> \<%= button\_to character.name, :action =\> :char\_sheet %\>  
\<% end %\>  

\<%= button\_to "Logout", :action =\> :logout %\>

account\_controller

require ‘reve’  
class AccountController \< ApplicationController

def login  
session[:user\_id] = nil  
if request.post?  
user = User.authenticate(params[:name], params[:password])  
if user  
session[:user\_id] = user.id  
session[:name] = user.name  
session[:eve\_id] = user.eve\_id  
session[:eve\_key] = user.eve\_full\_api\_key  
redirect\_to(:action =\> “get\_char\_list” )  
else  
flash.now[:notice] = “Invalid user/password combination”  
end  
end  
end

def logout  
session[:user\_id] = nil  
session[:name] = nil  
session[:eve\_id] = nil  
session[:eve\_key] = nil  
flash[:notice] = “Logged out”  
redirect\_to(:action =\> “login”)  
end

def index

end

def char\_sheet  
session[:char\_id] = “char\_id” =\> params[:id]

end

File lib/reve.rb, line 693

693: def character\_sheet(opts = { :characterid =\> nil })  
694: args = postfields(opts)  
695: h = compute\_hash(args.merge(:url =\> @@character\_sheet\_url))  
696: return h if h

##########  
END CODE  
##########

any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![martinmike2](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ba8739/32.png) [@martinmike2](https://www.ruby-forum.com/u/martinmike2)\
**Post date:** [October 6, 2009, 5:48pm UTC](https://www.ruby-forum.com/t/new-to-ruby-have-a-question/176814/2 "2009-10-06T17:48:46Z")

</div>

martinmike2 wrote:

> Hello,
> 
> I am trying to put together a RoR app using the REVE gem for the  
> online game EVE.  
> My problem is that I am getting the Stringify Keys error.

I think that is caused by not passing in a hash where one is expected  
[?]  
-r

---

<div class="post-metadata">

**Author:** ![martinmike2](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ba8739/32.png) [@martinmike2](https://www.ruby-forum.com/u/martinmike2)\
**Post date:** [October 6, 2009, 6:05pm UTC](https://www.ruby-forum.com/t/new-to-ruby-have-a-question/176814/3 "2009-10-06T18:05:43Z")

</div>

On Oct 6, 11:48 am, Roger P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> –  
> Posted viahttp://www.ruby-forum.com/.

ok, changing it to \<% sheet = api.character\_sheet(:characterid =\>  
session[:char\_id]) %\>  
gives me (105) Invalid CharacterID so apparantly that is a step in  
the right direction…

---

<div class="post-metadata">

**Author:** ![martinmike2](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ba8739/32.png) [@martinmike2](https://www.ruby-forum.com/u/martinmike2)\
**Post date:** [October 7, 2009, 5:16pm UTC](https://www.ruby-forum.com/t/new-to-ruby-have-a-question/176814/4 "2009-10-07T17:16:45Z")

</div>

martinmike2 wrote:

> On Oct 6, 11:48ï¿½am, Roger P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > –  
> > Posted viahttp://www.ruby-forum.com/.
> 
> ok, changing it to \<% sheet = api.character\_sheet(:characterid =\>  
> session[:char\_id]) %\>  
> gives me (105) Invalid CharacterID so apparantly that is a step in  
> the right direction…

Don’t know anything about REVE… but if you check the RDoc it states:

`
  character_sheet(opts = { :characterid => nil })
Gets the CharacterSheet from
EVE Online | The #1 Free Space MMORPG | Play here now! Expects:
```
* characterid ( Fixnum ) - Get the CharacterSheet for this Character

```
`

`which means it’s expecting a Fixnum and not a string…
`

hth  
ilan
