Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cannot load such file -- coffee_script

I'm going to remove active_admin from my angular rails app. So I ran the following commands.

rails destroy active_admin:install
rails destroy active_admin:resource product

And I met this error.

cannot load such file -- coffee_script

<%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'application' %>
like image 931
WebGuru Avatar asked Aug 18 '17 08:08

WebGuru


4 Answers

Try

rake tmp:cache:clear

or

try adding "gem 'coffee-rails', '~> 4.1.0'" to the Gemfile and running bundle:install.

in rails > 5.2

we need to use rake rails tmp:cache:clear

like image 184
Sachin R Avatar answered Oct 31 '22 18:10

Sachin R


Having the same issue, none of the solutions above worked for me.

Using rails 5.2.2, I added gem 'coffee-rails', '~> 5.0.0

Then bundle:install and rails tmp:cache:clear

Finally, I've restarted the server and all worked fine.

Hope this help.

like image 36
Thomas Jouvel Avatar answered Oct 31 '22 19:10

Thomas Jouvel


It may be the cache. Try this: rake tmp:cache:clear and restart your server.

like image 10
Roshan Avatar answered Oct 31 '22 18:10

Roshan


Clear Cache

Like the other answers say:

rake tmp:cache:clear

Do you have any coffee script files?

Likely, look in your assets/javascripts file: there may be some coffee script files in there. If you don't need them, then you can get can simply delete. Now try again and it should work.

If you have coffee script files that you want to keep:

Then add the following to your gemfile and run bundle install

gem 'coffee-rails', '~> 5.0.0'

It should now work.

like image 3
BenKoshy Avatar answered Oct 31 '22 20:10

BenKoshy