From: martinmike2 Date: 2009-10-06T23:55:08+09:00 Subject: New to ruby, have a question 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.