Rails EXECJS 运行时错误

2023-12-11

您好,我在 Demo#index 中收到 ExecJS::RuntimeError

下面是突出显示的第 6 行,下面是我的完整跟踪。有人可以回答:指出我调试此问题的正确方向以及调试轨道的良好参考。我是 Rails 新手。我的猜测是我错过了一个宝石(我检查以确保涡轮链接在那里)或者涡轮链接中的某些内容是错误的。我正在使用 Rails 4,使用 Rails 安装程序(在更新 gems 和rails 以及捆绑安装等之后)。

下面也是我的 gemfile

第 6 行突出显示:

<%= javascript_include_tag "application", "data-turbolinks-track" => true %>

以下是我的完整跟踪:

execjs (1.4.0) lib/execjs/external_runtime.rb:142:in `exec_runtime'
execjs (1.4.0) lib/execjs/external_runtime.rb:28:in `block in exec'
execjs (1.4.0) lib/execjs/external_runtime.rb:41:in `compile_to_tempfile'
execjs (1.4.0) lib/execjs/external_runtime.rb:27:in `exec'
execjs (1.4.0) lib/execjs/external_runtime.rb:19:in `eval'
execjs (1.4.0) lib/execjs/external_runtime.rb:33:in `call'
coffee-script (2.2.0) lib/coffee_script.rb:57:in `compile'
tilt (1.4.1) lib/tilt/coffee.rb:46:in `evaluate'
tilt (1.4.1) lib/tilt/template.rb:103:in `render'
sprockets (2.10.0) lib/sprockets/context.rb:197:in `block in evaluate'
sprockets (2.10.0) lib/sprockets/context.rb:194:in `each'
sprockets (2.10.0) lib/sprockets/context.rb:194:in `evaluate'
sprockets (2.10.0) lib/sprockets/processed_asset.rb:12:in `initialize'
sprockets (2.10.0) lib/sprockets/base.rb:374:in `new'
sprockets (2.10.0) lib/sprockets/base.rb:374:in `block in build_asset'
sprockets (2.10.0) lib/sprockets/base.rb:395:in `circular_call_protection'
sprockets (2.10.0) lib/sprockets/base.rb:373:in `build_asset'
sprockets (2.10.0) lib/sprockets/index.rb:94:in `block in build_asset'
sprockets (2.10.0) lib/sprockets/caching.rb:58:in `cache_asset'
sprockets (2.10.0) lib/sprockets/index.rb:93:in `build_asset'
sprockets (2.10.0) lib/sprockets/base.rb:287:in `find_asset'
sprockets (2.10.0) lib/sprockets/index.rb:61:in `find_asset'
sprockets (2.10.0) lib/sprockets/processed_asset.rb:111:in `block in resolve_dependencies'
sprockets (2.10.0) lib/sprockets/processed_asset.rb:105:in `each'
sprockets (2.10.0) lib/sprockets/processed_asset.rb:105:in `resolve_dependencies'
sprockets (2.10.0) lib/sprockets/processed_asset.rb:97:in `build_required_assets'
sprockets (2.10.0) lib/sprockets/processed_asset.rb:16:in `initialize'
sprockets (2.10.0) lib/sprockets/base.rb:374:in `new'
sprockets (2.10.0) lib/sprockets/base.rb:374:in `block in build_asset'
sprockets (2.10.0) lib/sprockets/base.rb:395:in `circular_call_protection'
sprockets (2.10.0) lib/sprockets/base.rb:373:in `build_asset'
sprockets (2.10.0) lib/sprockets/index.rb:94:in `block in build_asset'
sprockets (2.10.0) lib/sprockets/caching.rb:58:in `cache_asset'
sprockets (2.10.0) lib/sprockets/index.rb:93:in `build_asset'
sprockets (2.10.0) lib/sprockets/base.rb:287:in `find_asset'
sprockets (2.10.0) lib/sprockets/index.rb:61:in `find_asset'
sprockets (2.10.0) lib/sprockets/bundled_asset.rb:16:in `initialize'
sprockets (2.10.0) lib/sprockets/base.rb:377:in `new'
sprockets (2.10.0) lib/sprockets/base.rb:377:in `build_asset'
sprockets (2.10.0) lib/sprockets/index.rb:94:in `block in build_asset'
sprockets (2.10.0) lib/sprockets/caching.rb:58:in `cache_asset'
sprockets (2.10.0) lib/sprockets/index.rb:93:in `build_asset'
sprockets (2.10.0) lib/sprockets/base.rb:287:in `find_asset'
sprockets (2.10.0) lib/sprockets/index.rb:61:in `find_asset'
sprockets (2.10.0) lib/sprockets/environment.rb:75:in `find_asset'
sprockets (2.10.0) lib/sprockets/base.rb:295:in `[]'
sprockets-rails (2.0.0) lib/sprockets/rails/helper.rb:141:in `lookup_asset_for_path'
sprockets-rails (2.0.0) lib/sprockets/rails/helper.rb:90:in `block in javascript_include_tag'
sprockets-rails (2.0.0) lib/sprockets/rails/helper.rb:89:in `map'
sprockets-rails (2.0.0) lib/sprockets/rails/helper.rb:89:in `javascript_include_tag'
app/views/layouts/application.html.erb:6:in `_app_views_layouts_application_html_erb__93722521_39251544'
actionpack (4.0.0.rc1) lib/action_view/template.rb:143:in `block in render'
activesupport (4.0.0.rc1) lib/active_support/notifications.rb:161:in `instrument'
actionpack (4.0.0.rc1) lib/action_view/template.rb:141:in `render'
actionpack (4.0.0.rc1) lib/action_view/renderer/template_renderer.rb:61:in `render_with_layout'
actionpack (4.0.0.rc1) lib/action_view/renderer/template_renderer.rb:47:in `render_template'
actionpack (4.0.0.rc1) lib/action_view/renderer/template_renderer.rb:17:in `render'
actionpack (4.0.0.rc1) lib/action_view/renderer/renderer.rb:42:in `render_template'
actionpack (4.0.0.rc1) lib/action_view/renderer/renderer.rb:23:in `render'
actionpack (4.0.0.rc1) lib/abstract_controller/rendering.rb:127:in `_render_template'
actionpack (4.0.0.rc1) lib/action_controller/metal/streaming.rb:219:in `_render_template'
actionpack (4.0.0.rc1) lib/abstract_controller/rendering.rb:120:in `render_to_body'
actionpack (4.0.0.rc1) lib/action_controller/metal/rendering.rb:33:in `render_to_body'
actionpack (4.0.0.rc1) lib/action_controller/metal/renderers.rb:26:in `render_to_body'
actionpack (4.0.0.rc1) lib/abstract_controller/rendering.rb:97:in `render'
actionpack (4.0.0.rc1) lib/action_controller/metal/rendering.rb:16:in `render'
actionpack (4.0.0.rc1) lib/action_controller/metal/instrumentation.rb:41:in `block (2 levels) in render'
activesupport (4.0.0.rc1) lib/active_support/core_ext/benchmark.rb:12:in `block in ms'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
activesupport (4.0.0.rc1) lib/active_support/core_ext/benchmark.rb:12:in `ms'
actionpack (4.0.0.rc1) lib/action_controller/metal/instrumentation.rb:41:in `block in render'
actionpack (4.0.0.rc1) lib/action_controller/metal/instrumentation.rb:84:in `cleanup_view_runtime'
activerecord (4.0.0.rc1) lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime'
actionpack (4.0.0.rc1) lib/action_controller/metal/instrumentation.rb:40:in `render'
actionpack (4.0.0.rc1) lib/action_controller/metal/implicit_render.rb:10:in `default_render'
actionpack (4.0.0.rc1) lib/action_controller/metal/implicit_render.rb:5:in `send_action'
actionpack (4.0.0.rc1) lib/abstract_controller/base.rb:189:in `process_action'
actionpack (4.0.0.rc1) lib/action_controller/metal/rendering.rb:10:in `process_action'
actionpack (4.0.0.rc1) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
activesupport (4.0.0.rc1) lib/active_support/callbacks.rb:422:in `_run__842584183__process_action__callbacks'
activesupport (4.0.0.rc1) lib/active_support/callbacks.rb:80:in `run_callbacks'
actionpack (4.0.0.rc1) lib/abstract_controller/callbacks.rb:17:in `process_action'
actionpack (4.0.0.rc1) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (4.0.0.rc1) lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
activesupport (4.0.0.rc1) lib/active_support/notifications.rb:159:in `block in instrument'
activesupport (4.0.0.rc1) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.0.0.rc1) lib/active_support/notifications.rb:159:in `instrument'
actionpack (4.0.0.rc1) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
actionpack (4.0.0.rc1) lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
activerecord (4.0.0.rc1) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (4.0.0.rc1) lib/abstract_controller/base.rb:136:in `process'
actionpack (4.0.0.rc1) lib/abstract_controller/rendering.rb:44:in `process'
actionpack (4.0.0.rc1) lib/action_controller/metal.rb:195:in `dispatch'
actionpack (4.0.0.rc1) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
actionpack (4.0.0.rc1) lib/action_controller/metal.rb:231:in `block in action'
actionpack (4.0.0.rc1) lib/action_dispatch/routing/route_set.rb:80:in `call'
actionpack (4.0.0.rc1) lib/action_dispatch/routing/route_set.rb:80:in `dispatch'
actionpack (4.0.0.rc1) lib/action_dispatch/routing/route_set.rb:48:in `call'
actionpack (4.0.0.rc1) lib/action_dispatch/journey/router.rb:71:in `block in call'
actionpack (4.0.0.rc1) lib/action_dispatch/journey/router.rb:59:in `each'
actionpack (4.0.0.rc1) lib/action_dispatch/journey/router.rb:59:in `call'
actionpack (4.0.0.rc1) lib/action_dispatch/routing/route_set.rb:654:in `call'
rack (1.5.2) lib/rack/etag.rb:23:in `call'
rack (1.5.2) lib/rack/conditionalget.rb:25:in `call'
rack (1.5.2) lib/rack/head.rb:11:in `call'
actionpack (4.0.0.rc1) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
actionpack (4.0.0.rc1) lib/action_dispatch/middleware/flash.rb:241:in `call'
rack (1.5.2) lib/rack/session/abstract/id.rb:225:in `context'
rack (1.5.2) lib/rack/session/abstract/id.rb:220:in `call'
actionpack (4.0.0.rc1) lib/action_dispatch/middleware/cookies.rb:486:in `call'
activerecord (4.0.0.rc1) lib/active_record/query_cache.rb:36:in `call'
activerecord (4.0.0.rc1) lib/active_record/connection_adapters/abstract/connection_pool.rb:626:in `call'
activerecord (4.0.0.rc1) lib/active_record/migration.rb:366:in `call'
actionpack (4.0.0.rc1) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.0.0.rc1) lib/active_support/callbacks.rb:392:in `_run__736096468__call__callbacks'
activesupport (4.0.0.rc1) lib/active_support/callbacks.rb:80:in `run_callbacks'
actionpack (4.0.0.rc1) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (4.0.0.rc1) lib/action_dispatch/middleware/reloader.rb:64:in `call'
actionpack (4.0.0.rc1) lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
actionpack (4.0.0.rc1) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
actionpack (4.0.0.rc1) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.0.0.rc1) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.0.0.rc1) lib/rails/rack/logger.rb:21:in `block in call'
activesupport (4.0.0.rc1) lib/active_support/tagged_logging.rb:67:in `block in tagged'
activesupport (4.0.0.rc1) lib/active_support/tagged_logging.rb:25:in `tagged'
activesupport (4.0.0.rc1) lib/active_support/tagged_logging.rb:67:in `tagged'
railties (4.0.0.rc1) lib/rails/rack/logger.rb:21:in `call'
actionpack (4.0.0.rc1) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
rack (1.5.2) lib/rack/runtime.rb:17:in `call'
activesupport (4.0.0.rc1) lib/active_support/cache/strategy/local_cache.rb:83:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
actionpack (4.0.0.rc1) lib/action_dispatch/middleware/static.rb:64:in `call'
railties (4.0.0.rc1) lib/rails/engine.rb:511:in `call'
railties (4.0.0.rc1) lib/rails/application.rb:96:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
rack (1.5.2) lib/rack/content_length.rb:14:in `call'
rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'

该项目的 GEMFILE 下面

source 'https://rubygems.org'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.0.rc1'

# Use sqlite3 as the database for Active Record
gem 'sqlite3'

# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0.rc1'

# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'

# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'

# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.0.1'

group :doc do
  # bundle exec rake doc:rails generates the API under doc/api.
  gem 'sdoc', require: false
end

# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# Use unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano', group: :development

# Use debugger
# gem 'debugger', group: [:development, :test]

我遇到了同样的错误并修复它:)

  1. 打开 Gemfile
  2. 添加这些行: 宝石'execjs' 宝石“therubyracer”
  3. 保存文件中的更改
  4. 在终端上执行捆绑安装
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Rails EXECJS 运行时错误 的相关文章

随机推荐

  • 与计算域的剔除映射

    我从 WCF 服务获取数据 然后映射数据并将其与 DOM 对象绑定 var PayinyVM getJSON service PaidService svc PaidList function data var tmp JSON strin
  • Android 无法通过 AlarmManager 传递意图附加信息

    我试图在我的意图中添加一条额外的消息 以传递给 AlarmManager 以供稍后触发 我的 onReceive 正确触发 但 extras getString 返回 null Setup public PendingIntent getP
  • watir-webdriver - 单击 Javascript 按钮

    第一周进行 watir webdriver 和 Web 应用程序测试 因此仍在尝试概括一些概念 有这个 javascript 元素
  • 如何在打开新网页后继续VBA代码

    我是创建 VBA 代码的新手 并且正在慢慢对其有基本的了解 但是如果没有帮助 我无法通过项目的这一点 我有下面的代码并且运行良好 直到我需要在打开的新页面上继续该代码 我不知道如何继续代码 计划是能够单击赔率比较选项卡并从该页面提取数据 任
  • Outlook 类似于侧边栏并在 Outlook 中显示

    我正在使用VS2008 想尝试应用程序的Outlook样式显示 请指导我如何拥有像侧边栏和类似显示的外观 是否可以使用现有的控件 另请注明这些是否是 WPF 控件 thanks 以下是 CodeProject 中的几个示例 http www
  • 正则表达式 (Javascript) - 取一个打乱的单词并找到一个未打乱的匹配项

    我有一个英语词典中所有单词的列表 270 000 多个单词 存储在一个名为的变量中theList 我有一个乱码word我想通过与单词列表匹配来解读 最初 我认为下面的代码可以解决问题 但效果不太好 var theList Contains
  • 是否可以在java中动态“添加”到类路径?

    java classpath classes jar parserTester 如何以编程方式获取上述命令中的功能 就像 是否可以运行为 java parserTester 并得到相同的结果 我尝试使用 URLClassLoader 但它修
  • Python/Pycharm,Ctrl-空格键不会显示代码完成

    我有以下文件 为什么当我按时代码补全不运行Ctrl Space在 r 之后 红色框中写着 没有建议 程序运行并输出 200 author hape import urllib request import urllib response p
  • “git push”删除未跟踪的远程文件

    我正在运行一个网络服务器 允许用户将图像上传到服务器 但是 我正在使用git管理我的源代码 以及git push操作会删除服务器上与我的本地结账不匹配的任何内容 所以我每次运行时都会丢失图像git push 起初我以为我可以protect上
  • 使用 Kinect 和 EMGU(OpenCV 包装器)进行机器人定位

    我正在开发小型 WPF 桌面应用程序来跟踪机器人 我的办公桌上有一个 Windows 版 Kinect 我能够执行基本功能并运行深度摄像头流和 RGB 摄像头流 我需要的是跟踪地板上的机器人 但我不知道从哪里开始 我发现我应该使用 EMGU
  • PyCharm 和 PYTHONPATH

    我有一个用于我的目录PYTHONPATH c test my scripts 在这个目录中 我导入了一些模块 它在我的 Python shell 中运行良好 如何将此目录路径添加到 PyCharm 以便我可以导入该目录中的内容 过时了 有关
  • float.Parse 中的浮动精度丢失

    float s float Parse 10499 9705314636 Now s有价值10499 97 有没有办法保存所有的精 度数字 您可能想查看浮点数 双精度数和小数之间的区别 特别注意 a 之间的区别binary浮点类型 和一个d
  • Facebook 爬虫目前是否在解析 DOM 之前解释 javascript?

    以下链接似乎表明它不能 Facebook Sharer 在共享我的 URL 时如何选择图像和其他元数据 但我想知道目前情况是否仍然如此 facebook 开发网站上的文档没有给出关于这一点的任何精确信息 在我运行的测试中 我从未见过它解释
  • 集合组查询是否从所有同名集合中获取数据?

    我有这个 Firebase Cloud Firestore 架构 my db gt users gt uid gt places gt placeId and my db gt places gt placeId 此集合组查询是否会在两条路
  • Python Sockets - 如何关闭服务器?

    我尝试用Python中的socket模块制作一个简单的聊天系统 一切正常 除了每次我想关闭服务器时都需要终止该进程 我不想每次都这样做 所以我的问题是 我怎样才能创建一个函数 当我输入时shutdown在服务器终端中 它会关闭整个服务器 我
  • Python - 填写并提交 HTML 表单

    我想使用 python 在网页上填写并提交表单 我想要与之交互的表单有几个使用 JavaScript 填充的下拉框 我看过机械化库 但它不处理 JavaScript 您能建议一个与表单交互的替代库 方法吗 Cheers Pete Selen
  • sendBroadscast VS startActivity。有什么不同?

    sendBroadcast 意图 和startActivity 意图 之间有什么区别 为什么这不起作用 Intent smsIntent new Intent Intent ACTION SENDTO smsIntent setData U
  • TCP 客户端-服务器 SIGPIPE

    我正在设计和测试一个基于TCP套接字 互联网域 的客户端服务器程序 目前 我正在本地计算机上对其进行测试 无法理解有关 SIGPIPE 的以下内容 SIGPIPE 的出现相当随机 它可以是确定性的吗 第一个测试涉及来自客户端的单个小 25
  • php - 从一种 json 格式转换为另一种格式

    我正在使用 php 从 mysql 数据库获取数据 并对获取的输出进行 json 编码 json encode data 结果数据的形式为 name aaa name bbb 我想将其放入一个更大的 json 对象中 并在网络浏览器中以以下
  • Rails EXECJS 运行时错误

    您好 我在 Demo index 中收到 ExecJS RuntimeError 下面是突出显示的第 6 行 下面是我的完整跟踪 有人可以回答 指出我调试此问题的正确方向以及调试轨道的良好参考 我是 Rails 新手 我的猜测是我错过了一个