Here's some background of my problem:
I am on Snow Leopard I have RVM installed(using a ruby1.9.2-head installation) I am using rails3 I installed the ym4r using this http://github.com/guilleiguaran/ym4r_gm (and followed the tutorial)
Anyway, I added these to my controller:
@map = GMap.new("map_div")
@map.control_init(:large_map => true,:map_type => true)
@map.center_zoom_init([75.5,-42.56],4)
@map.overlay_init(GMarker.new([75.6,-42.467],:title => "Hello", :info_window => "Info! Info!"))
then these to my view:
Test <%= raw(GMap.header) %> <%= raw(@map.to_html) %> <%= raw(@map.div(:width => 600, :height => 400)) %>
well actually im using haml(does it matter?)
Test
= raw(GMap.header)
- unless @map.blank?
= raw(@map.to_html)
#map{:style => "width: 600px; height: 400px"}
problem is i keep getting a
Showing /Users/eumir/rails_apps/evo-lux/app/views/layouts/_map.html.haml where line #11 raised:
can't convert Ym4r::GmPlugin::Variable to String (Ym4r::GmPlugin::Variable#to_str gives Ym4r::GmPlugin::Variable)
Extracted source (around line #11):
9: Test 10: = raw(GMap.header) 11: = raw(@map.to_html) 12: = raw(@map.div(:width => 600, :height => 400))
which is totally weird. I can't double check with debugger(it's another error altogether...my rails cant find ruby-debugger)
so im really kinda stumped. Any help?