Alberto Pat Martínez
2013-May-29 17:33 UTC
Why can''t get remote javascript libraries on Rails 4
In rails 3, I included this line: *<%= javascript_include_tag "http://cdn.leafletjs.com/leaflet-0.5.1/leaflet.js" %>* But when migrate to rails 4, its not posible and I get the next error: *Invalid argument - C:/Ruby193/findiner/app/assets/javascripts/http://cdn.leafletjs.com/leaflet-0.5.1 * So far, I won''t be able to get remote libraries. Thanks for help! -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/522b49ed-cfe1-4681-b907-9b1062adc876%40googlegroups.com?hl=en-US. For more options, visit https://groups.google.com/groups/opt_out.
Hassan Schroeder
2013-May-29 21:48 UTC
Re: Why can''t get remote javascript libraries on Rails 4
On Wed, May 29, 2013 at 10:33 AM, Alberto Pat Martínez <apmsuperior-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> In rails 3, I included this line: > <%= javascript_include_tag > "http://cdn.leafletjs.com/leaflet-0.5.1/leaflet.js" %> > > But when migrate to rails 4, its not posible and I get the next error: > Invalid argument - > C:/Ruby193/findiner/app/assets/javascripts/http://cdn.leafletjs.com/leaflet-0.5.1That usage is still in the docs, and I just tried it on a fresh test app (Rails 4.0.0.rc1) without a problem. Perhaps you could create a small test app that demonstrates this? Or at least show the complete file where it occurs? -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org http://about.me/hassanschroeder twitter: @hassan -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CACmC4yAVz11NmGYD1VHT69sMt3RxVuMoCoiNLG09N_tBprEOPg%40mail.gmail.com?hl=en-US. For more options, visit https://groups.google.com/groups/opt_out.
On Wednesday, May 29, 2013 1:33:31 PM UTC-4, Alberto Pat Martínez wrote:> > In rails 3, I included this line: > *<%= javascript_include_tag " > http://cdn.leafletjs.com/leaflet-0.5.1/leaflet.js" %>* > > But when migrate to rails 4, its not posible and I get the next error: > *Invalid argument - C:/Ruby193/findiner/app/assets/javascripts/ > http://cdn.leafletjs.com/leaflet-0.5.1* > > So far, I won''t be able to get remote libraries. Thanks for help! >I''m not sure what this does, but I put your reference into the head section of one of my application layouts and it worked fine (no errors and when I inspect the app in a browser, the js file is being loaded without errors). The only thing that''s different is that I''m running ruby 2.0, rails 4.0.rc1. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/2d3f301d-6091-49f8-a233-6319b6fe1498%40googlegroups.com?hl=en-US. For more options, visit https://groups.google.com/groups/opt_out.