Jump to content

The ultimate community for Ruby on Rails developers.


Photo

Rails 4 link_to doesn't load javascript assets

rails 4 assets

  • Please log in to reply
4 replies to this topic

#1 Giacomo

Giacomo

    Signalman

  • Members
  • 15 posts
  • LocationBologna

Posted 28 March 2014 - 03:24 PM

Hi all.

I have a problem with link_to (apparently) and javascript asset pipeline.

It seems that if I click on a link the asset pipeline isn't load.

 

If I visit the page http://localhost:300/somepage

I get a long list of "Started GET "/assets/kingboard/stat/flot/jquery.flot.min.js?body=1" for 127.0.0.1 at 2014-03-28 16:22:59 +0100"

but if I visit a page using the links that long list doesn't appear.

 

Is it a known issue? how can I fix it?


--

G.


#2 Giacomo

Giacomo

    Signalman

  • Members
  • 15 posts
  • LocationBologna

Posted 29 March 2014 - 09:42 AM

Could it be related to turbolink?


--

G.


#3 Giacomo

Giacomo

    Signalman

  • Members
  • 15 posts
  • LocationBologna

Posted 29 March 2014 - 10:00 AM

Could it be related to turbolink?

 

Yes, it is.

I removed turbolinks and now it seems to works well. 


--

G.


#4 folubode

folubode

    Signalman

  • Members
  • 14 posts

Posted 11 November 2015 - 12:22 PM

How did you remove turbo links please? have the same problem



#5 rahoulb

rahoulb

    Controller

  • Members
  • 111 posts
  • LocationHeadingley, Leeds, England

Posted 12 November 2015 - 02:45 PM

The idea is that Turbolinks saves time by only loading all your assets once (so the browser doesn't need to do multiple downloads, plus parsing the JS and CSS multiple times) - so technically it's working correctly.  


Write better Ruby and Rails code: http://theartandscienceofruby.com/






Also tagged with one or more of these keywords: rails 4, assets

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users