views:

129

answers:

3

I have the following at the top of my view:

<%= GMap.header %>

Heroku is giving me an ActionView::TemplateError on that line.... this works on my own machine but not on Heroku.... why is that? Is there something about Heroku that doesn't allow?

In the final compile on the browser, the above code translates into this on the client side:

<script src="http://maps.google.com/maps?file=api&amp;amp;v=2.x&amp;amp;key=XXXXX;hl=&amp;amp;sensor=false" type="text/javascript">
</script>
<script src="/javascripts/ym4r-gm.js" type="text/javascript"></script>
+1  A: 

Try this instead:

<%= GMap.header(:with_vml => false, :host => request.host) %>

DLC
Hey, did this work at all? I've got the same problem
ro
A: 

In Rails 3 the following works:

<%= GMap.header(:with_vml => false, :host => request.host).html_safe %>
PeterK
A: 

it was smooth. Thank! for the workaround. Any reasoning behind it?

Sanchit Garg