0

Im a begginer on rails and im having a lot of trouble trying to use custom css on my project. I have all the files from a frontend project that has all the html, css and js already working. So, I have created a new controller, named Public, and all the views that I need. Theses views are the sections of my frontend pages. Like contact, home, etc.. So, I put all the custom css on the folder assets/stylesheets. And all the js files on assets/javascripts. After that, I have created a new layout, named: public.html.erb. On it, Im tryng to call my custom css file:

<%= stylesheet_link_tag  'app', media: 'all' %>

or

<%= stylesheet_link_tag  'application', media: 'all' %>

Either way, Im still getting the error: ExecJS::ProgramError in Public#nameofmyview

I tried to edit the manifest file too. I put above the line: (= require_tree .) the line: (= app) that is the name of my custom css. Still not working. If I replace the word application on the stylesheet_link_tag helper, the pages loads but without any css. So, if I wanna use custom css files on my project, on windows, what should I do?

churros
  • 419
  • 1
  • 8
  • 20
  • Possible duplicate of [Rails ExecJS::ProgramError in Pages#home?](http://stackoverflow.com/questions/28421547/rails-execjsprogramerror-in-pageshome) – Brad Werth Feb 10 '17 at 22:55

1 Answers1

0

They way that I solved it was adding all my custom files (css, js, etc) to the file initializers/assets.rb.

I didnt have any other problem since then. But, is it right to do it? Edit this file the way I did.. Im asking it cause I was following a Lynda tutorial and there this files wasnt change, only the manifest. is it good?

churros
  • 419
  • 1
  • 8
  • 20