UPDATE: Colin\'s suggestion of removing the line //= require_tree . has fixed the issue.
I have wasted over 2 days trying to follow every suggestion
Quick and dirty solution: remove //= require_tree .
from application.js
.
As I explain in the comments for the question, this doesn't actually solve the underlying issue that is causing the error, but merely sidesteps it.
Did you change the location of your code from C:\Users\this-user\yo-app?
When I was young in rails I have created an app and the default location of my app was C:\Users\Duncan\my-app and then, when I changed my-app and placed it in D:\All-my-Apps-folder i had that error....
I scratched my head, tried 1,2,3 and more .....nothing! Until I returned all code to default folder location and to my amazement, I was rolling again :)
In case someone may find this useful (I can't explain why that happened, maybe someone may without speculation)
I used the solution number 2 because previously i had have this mistake, but in this ocation didn't work, then I added the
gem 'coffee-script-source', '1.8.0'
and run
bundle install
and my problem was fixed
I had this problem and was scowering the internet I am running Windows 8 with this rails gem file
source 'https://rubygems.org'
gem 'rails', '3.2.9'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
group :development do gem 'sqlite3', '1.3.5'
end
# Gems used only for assets and not required # in production environments by default.
group :assets do
gem 'sass-rails', '3.2.5'
gem 'coffee-rails', '3.2.2'
gem 'uglifier', '1.2.3'
end
gem 'jquery-rails', '2.0.2'
group :production do
gem 'pg', '0.12.2'
end
Went to http://nodejs.org/download/ installed - restarted the machine and everything worked.
I had to add my nodejs folder to my Windows Path environment variable. In Windows 8 open the Control Panel, go to System, Advanced system settings (on the left), click Environment Variables on the left, and edit the Path variable to include the directory to your nodejs folder (probably in Program Files).
Of course you have to have Node.js installed (use the Windows installer) and have installed CoffeeScript through NPM.
For beginners like me:
Change line 6 from:
'<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>'
to
<%= javascript_include_tag 'defaults', 'data-turbolinks-track' => true %>
Source from tutorial to fix here