mercredi 6 novembre 2019

Include scripts folder in my ruby on rails application

I try to integrate a script folder (with different file in .ts), located in my folder "javascript", in my ruby on rails application but when I make an alert in my index.ts, it doesn't work.

I have the balise javascript pack tag in my application.html.erb

<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>

I installed the gem 'typescript-rails' to run my .ts files I also tried to rename the file in .js.ts but it doesn't work either.

Do you have any idea how to run those files ?

Aucun commentaire:

Enregistrer un commentaire