JavaScripts Not Working When Views Are Displayed - Rails 4 Ruby 2 -


i creating new versions of rails 3.2.13 applications using rails 4.0.0 , ruby 2.0.0. using latest version of michael hartl's ruby on rails tutorial guide. not familiar of gems being used such turbolinks.

i have several websites have javascript in views in application.html.erb. there times scripts work when view first displayed. other times page display no scripts executed. when happens refresh page , scripts work. happens time time 'new' twitter widgets , widgets weather channel.

here have in application.html.erb:

<%= stylesheet_link_tag    "application", media: "all",                                             "data-turbolinks-track" => true %> <%= javascript_include_tag "application", "data-turbolinks-track" => true %> 

i have not changed other code in views. when run rails 3 version scripts execute when views displayed. when run rails 4 version have refresh pages scripts before execute.

any appreciated.

i had been looking answers on web right before posted question decided check again. found post stated appears there conflicts using turbolinks , javascript @ times. suggested solution not require turbolinks in application.js.

//= require turbolinks 

when deleted statement application.js scripts worked had in rails 3 version of application.


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -