Re: undefined method `relative_url_root''

Stephen Fagan
Mon, 04 May 2009 07:05:41 -0000

pharrington wrote:
> The source the the error is the ym4rgm plugin:
>
> a << "<script
src=\"#{ActionController::Base.relative_url_root}/
> javascripts/ym4r-gm.js\"
type=\"text/javascript\"> \n" unless
> options[:without_js]
>
> However, it''s strange that that error is happening, as
> ActionController::Base.relative_url_root has been around for awhile.
> What version of Rails are you running? You can also try changing that
> line in ym4r_gm/lib/gm_plugin/map.rb to something like:
>
> a << javascript_include_tag ''ym4r-gm'' unless
options[:without_js}
>
> To see if that resolves the issue.
>
> On May 3, 11:39�am, Stephen Fagan <rails-mailing-l...@andreas-s.net>

Hi,

I''m using 2.0.2. Im not 100% what you meant in your post. Do you mean
replace the whole line with the line a "<< javascript_include_tag
''ym4r-gm'' unless options[:without_js}"? (This gives an
''unexpected
tSTRING_BEG'' error). Apologies if this seems trivial, I am a novice to
rails :@/