rails/rails — Issue #4968: home.js.coffee must be deleted for newly generated rails app to work
Author: daveheitzman
Created: 2012-02-09 13:32:08+00:00
State: open

gem install rails # => Rails 3.2.1
rails new my_app
cd my_app
rm public/index.html
rails g controller home
... add def index end to home_controller.rb
add file my_app/app/views/home/index.html.erb
rails server
visit localhost:3000

Started GET "/" for 127.0.0.1 at 2012-02-09 07:21:41 -0600
Processing by HomeController#index as HTML
Rendered home/index.html.erb within layouts/application (9.9ms)
Compiled home.css (13ms) (pid 25470)
Compiled application.css (43ms) (pid 25470)
Compiled jquery.js (1ms) (pid 25470)
Compiled jquery_ujs.js (0ms) (pid 25470)
Completed 500 Internal Server Error in 3094ms

ActionView::Template::Error (
(in /home/gruen/websitework/ils2/app/assets/javascripts/home.js.coffee)):
3:

4:

Ils2

5: <%= stylesheet_link_tag "application", :media => "all" %>
6: <%= javascript_include_tag "application" %>
7: <%= csrf_meta_tags %>
8:

9:

app/views/layouts/application.html.erb:6:in `_app_views_layouts_application_html_erb___3058198713664194493_30882500'

Rendered /home/gruen/.rvm/gems/ruby-1.9.2-p290@ils2/gems/actionpack-3.2.1/lib/action_dispatch/middleware/templates/rescues/_trace.erb (4.1ms)
Rendered /home/gruen/.rvm/gems/ruby-1.9.2-p290@ils2/gems/actionpack-3.2.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (1.1ms)
Rendered /home/gruen/.rvm/gems/ruby-1.9.2-p290@ils2/gems/actionpack-3.2.1/lib/action_dispatch/middleware/templates/rescues/template_error.erb within rescues/layout (7.6ms)

rm home.js.coffee

rails server

visit http://localhost:3000/ -- works fine