Я слежу за demo_app в Книга Майкла Хартла «Рубин на Rails 3 Tutorail» . Демонстрация представляет собой простое имя пользователя Scaffold: string email: string
Я получаю ошибку в моем application.html.erb файле:
Errno::EINVAL in Users#index
Showing ~/demo_app/app/views/layouts/application.html.erb where line #6 raised:
Invalid argument - cscript //E:jscript //Nologo //U /tmp/execjs20120323-4388-1an85xw-0.js 2>&1
(in ~/demo_app/app/assets/javascripts/users.js.coffee)
3: <head>
4: <title>DemoApp</title>
5: <%= stylesheet_link_tag "application", :media => "all" %>
6: <%= javascript_include_tag "application" %>
7: <%= csrf_meta_tags %>
8: </head>
9: <body>
если я изменю строку № 6 до:
<%= javascript_include_tag "default" %>
Программа будет работать отлично, за исключением того, что она не позволит мне удалять пользователей (предположительно, потому что она не работает с javascript).
Информация об окружающей среде:
$ ruby -v
ruby 1.8.7 (2012-02-08 patchlevel 358) [i386-cygwin]
$ rails -v
Rails 3.2.2
Содержимое ~ \ demo_app \ app \ assets \ javascripts \ users.js.coffee:
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
Содержимое ~ \ demo_app \ app \ assets \ javascripts \ application.js
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
// GO AFTER THE REQUIRES BELOW.
//
//= require jquery
//= require jquery_ujs
//= require_tree .