Rails 3.1 issue with javascript_include_tag in application.html.erb -
I have a clean and easy Rail 3.1 application called demo1 in which there are two controllers - hello and goodbye when I have to load If I try, I get the following error:
ActionView :: Template :: error ((/ home / me / dev / ruby / demo1 / app / assets / javascripts / say js .coffee)): 3: & lt; Head & gt; 4: & lt; Title & gt; Demo 1 & lt; / Title & gt; 5: & lt;% = stylesheet_link_tag "application"%> 6: & lt;% = javascript_include_tag "Application"% & gt; 7: & lt;% = csrf_meta_tags% & gt; 8: & lt; / Head & gt; 9: & lt; Body & gt; App / views / layout / application.html.erb: 6: `` _app_views_layouts_application_html_erb___558576499_89622220 ' application.html.erb is the problem line: & lt;% = javascript_include_tag "application"%> When I created this special line using Rail 3.0, it was:
<% = javascript_include_tag: defaults%> And it worked fine. In fact, when I change application.html.erb to change: everything works by default, but I have the new features of Rail 3.1 Want to use
I do not see anything around Google, I think because Rail 3.1 has just been released.
By the way, I am following the first chapter in the book.
Some environmental information that can help answer it Question:
$ cat / etc / issue Ubuntu 10.04.2 lts \ n \ l $ ruby -v Rabbi 1.9.2 P290 (2011-07-09 Amendment 32553) [i686-linux] $ Railway-P Railway 3.1.0 say.js .coffee file contents: # Keep all the behaviors and hook related to the matching controller here. # All logic will be available automatically in application.js # You can use a coffee script in this file: http://jashkenas.github.com/coffee-script/
OK, I know what the problem was, and so I will answer my question.
The code was commented on the problem in the app / assets / javascript / application js file. However, one of the commented lines was as follows: // need_tree When I remove this line then everything works well Does.
Hope it helps. If someone can provide some insight, then why is it that the underscores were growing due to the problem.
Comments
Post a Comment