Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/54.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript没有';不适用于javascrip_inlcue-tag Rails 3.2.2_Javascript_Ruby On Rails_Ruby On Rails 3 - Fatal编程技术网

Javascript没有';不适用于javascrip_inlcue-tag Rails 3.2.2

Javascript没有';不适用于javascrip_inlcue-tag Rails 3.2.2,javascript,ruby-on-rails,ruby-on-rails-3,Javascript,Ruby On Rails,Ruby On Rails 3,我正在关注中的演示应用程序。演示是一个简单的Scaffold用户名:string电子邮件: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

我正在关注中的演示应用程序。演示是一个简单的Scaffold用户名:string电子邮件: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>
~\demo\u 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\u 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 .

尝试取消注释gem'therubyracer'并运行bundle,同时最好使用最新稳定版本的ruby

尝试取消注释gem'therubyracer'并运行bundle,另外,最好使用ruby的最新稳定版本

我四处搜索了关于gem therubyracer的其他问题。我找到了一个答案,表明了卡尔迪巴耶夫在这里的建议。那对我不起作用。但还有另一个建议是删除代码

//= require_tree . 
从app/assets/javascripts/application.js文件


删除该代码使应用程序工作(包括销毁功能)

我四处寻找讨论宝石therubyracer的其他问题。我找到了一个答案,表明了卡尔迪巴耶夫在这里的建议。那对我不起作用。但还有另一个建议是删除代码

//= require_tree . 
从app/assets/javascripts/application.js文件



删除该代码使应用程序工作(包括销毁功能)

发布你的
users.js.coffee
文件。你能发布app/assets/javascripts/users.js.coffee的内容吗。还要确保您遵循的是Rails 3.2-john的书籍版本,确认我正在遵循上面发布的user.js.coffee的版本=3.2.content。请发布你的application.js和app/assets/javascript文件夹中的文件。发布你的
users.js.coffee
文件。你能发布app/assets/javascript/users.js.coffee的内容吗。另外,请确保您遵循的是Rails 3.2-john的书籍版本,确认我遵循的是上面发布的user.js.coffee的version=3.2.content。请发布您的application.js和app/assets/javascript文件夹中的文件。我删除了对therubyracer的评论,捆绑安装遇到了与libv8 gem有关的问题。错误:“安装libv8(3.3.10.4)时出错,绑定程序无法继续。请确保在绑定之前
gem install libv8-v'3.3.10.4'
成功。”要取消绑定libv8:git clonegit@github.com:fractaloop/libv8 cd libv8 git子模块更新--init bundle安装bundle exec rake compileSaid,即使我的程序运行正常,我是否仍应该按照你的建议取消gem therubyracer的注释并卸载libv8?oop,我认为你在安装libv8时遇到了问题,如果它安装成功,那么你可以跳过上一步,因此用户索引中的Errno::EINVAL已经消失了?是的,错误号:EINVAL已经消失。我删除了对RubyRacer的评论,捆绑安装遇到了与libv8 gem有关的问题。错误:“安装libv8(3.3.10.4)时出错,绑定程序无法继续。请确保在绑定之前
gem install libv8-v'3.3.10.4'
成功。”要取消绑定libv8:git clonegit@github.com:fractaloop/libv8 cd libv8 git子模块更新--init bundle安装bundle exec rake compileSaid,即使我的程序运行正常,我是否仍应该按照你的建议取消gem therubyracer的注释并卸载libv8?oop,我认为你在安装libv8时遇到了问题,如果它安装成功,那么你可以跳过上一步,因此用户索引中的Errno::EINVAL已经消失了?是的,埃因瓦尔消失了。
//= require_tree .