YM4R - convert variable to string error

Rails 2.3.8, ruby, rubygems 1.3.7, ym4r-0.6.1, ym4r_gm (http://


I keep getting the following error:

ActionView::TemplateError (can’t convert Ym4r::GmPlugin::Variable to
String (Ym4r::GmPlugin::Variable#to_str gives
Ym4r::GmPlugin::Variable)) on line #3 of app/views/gpspoints/

1: src=“http://maps.google.com/maps?

2: <%= GMap.header %>
3: <%= @map.to_html %>
4: <%= @map.div(:width => 600, :height => 400) %>

I believe the @map.to_html call is failing.

I ran the code on the console and the @map.control_init(:large_map =>
true,:map_type => true) call returned “nil”. I am new to RoR - - I
do not know if the ‘nil’ behavior is to be expected. I was curious
because the latter call appears to build the array for the
@map.to_html call.

This is very frustrating; I have the midlet running and datastore
complete in my N95 and the mySQL database under RoR ready . … but,
the whole point is to display the GPS from the phone on the map.

If anyone has any thoughts, I would apprecate your guidance.


I had the same problem.

In mapping.rb of the plugin, add this function to class Variable

def to_str
@variable + “;”

Appears to work fine after this fix.