Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable coffeescript on Rails 5

I started a new rails 5.1.4 project but I have forgotten to add --skip-coffee on rails new.

Is there a way to remove the coffeescript dependency without creating a new project?.

like image 202
JuanCrg90 Avatar asked Dec 13 '17 02:12

JuanCrg90


1 Answers

  1. Remove or comment out gem 'coffee-rails' from Gemfile.
  2. Change Javascript files that ends with .js.coffee to .js.
  3. Add config.generators.javascript_engine = :js to your application.rb.
  4. Make sure your tmp cache is cleared with rake tmp:cache:clear
like image 168
ogirginc Avatar answered Nov 17 '22 05:11

ogirginc