I’m new to ruby and rails and walking (crawling?) through the tutorial. the second project uses scaffolding to create a user that consists of a name and email address. when i try to view the users screen I get the following:
ExecJS::RuntimeError in Users#index
Showing /home/max/rails_proj/demo_app/app/views/layouts/application.html.erb where line #6 raised:
湉異⁴牅潲㩲唠歮潮湷漠瑰潩⼢浴⽰硥捥獪〲ㄱ㤰㔲㐭㜲ⴲ㠱㝮穩ⴰ⸰獪•灳捥晩敩
(in /home/max/rails_proj/demo_app/app/assets/javascripts/users.js.coffee)
Extracted source (around line #6):
3: <head>
4: <title>DemoApp</title>
5: <%= stylesheet_link_tag "application" %>
6: <%= javascript_include_tag "application" %>
7: <%= csrf_meta_tags %>
8: </head>
9: <body>
Rails.root: /home/max/rails_proj/demo_app
Application Trace | Framework Trace | Full Trace
app/views/layouts/application.html.erb:6:in `_app_views_layouts_application_html_erb__1031573605_1065816420'
app/controllers/users_controller.rb:7:in `index'
I am using windows xp, cygwin, rails 3.1.0 (i’ve tried the new rc1 also), ruby 1.8.7.
I found this error on google and there’s supposedly a fix which i’ve tried to use (the execjs gem 1.2.9) but that doesn’t seem to fix it for me…. i have tried all the fixes (to the best of my limited ruby etc ability at this point) but nothing seems to work although the error message is sometimes different – still errors on the same line.
I’ve tried to uninstall and reinstall cygwin, ruby, rails etc.. to no avail so far…
any feedback would be great!
As someone who tried to do that book on windows, I have 2 pieces of advice:
Install Ubuntu to run ruby on rails. It is a little bit of work, but if you are going to invest time and effort it is worth it 100 times over. You can set up dual install with existing windows. Or, just find an old computer and install it on there. It uses much less power than windows xp and only about 300 Mb of memory.
Start with Agile Web Development with Rails. http://www.amazon.com/Agile-Development-Rails-Pragmatic-Programmers/dp/1934356549 . It is a much better first tutorial.