- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试部署到 Heroku,但遇到了此错误。我做了一些研究,并在查看相关帖子后尝试卸载并重新安装一些 gem,但我不太确定这里出了什么问题,因为我不熟悉实际问题是什么。请帮忙!我应该怎么办?到目前为止我认为这与 jquery 有关。
ExecJS::ProgramError: Unexpected character '#' (line: 13912, col: 0, pos: 394110)
remote: Error
remote: at new JS_Parse_Error (/tmp/execjs20150204-1143-zrnj29js:2359:10623)
remote: at js_error (/tmp/execjs20150204-1143-zrnj29js:2359:10842)
remote: at parse_error (/tmp/execjs20150204-1143-zrnj29js:2359:12560)
remote: at Object.next_token [as input] (/tmp/execjs20150204-1143-zrnj29js:2359:17582)
remote: at next (/tmp/execjs20150204-1143-zrnj29js:2359:18900)
remote: at semicolon (/tmp/execjs20150204-1143-zrnj29js:2359:19745)
remote: at simple_statement (/tmp/execjs20150204-1143-zrnj29js:2359:22580)
remote: at /tmp/execjs20150204-1143-zrnj29js:2359:20708
remote: at /tmp/execjs20150204-1143-zrnj29js:2359:19957
remote: at /tmp/execjs20150204-1143-zrnj29js:2359:31968
remote: at Object.parse (/tmp/execjs20150204-1143-zrnj29js:2360:152)
remote: (in /tmp/build_eb6f5cb07cab440eb52a1d47cb70ca23/app/assets/javascripts/application.js)/tmp/build_eb6f5cb07cab440eb52a1d47cb70ca23/vendor/bundle/ruby/2.0.0/gems/execjs-2.2.2/lib/execjs/external_runtime.rb:64:in `extract_result'
remote: /tmp/build_eb6f5cb07cab440eb52a1d47cb70ca23/vendor/bundle/ruby/2.0.0/gems/execjs-2.2.2/lib/execjs/external_runtime.rb:29:in `exec'
remote: /tmp/build_eb6f5cb07cab440eb52a1d47cb70ca23/vendor/bundle/ruby/2.0.0/gems/uglifier-2.7.0/lib/uglifier.rb:200:in `run_uglifyjs'
remote: /tmp/build_eb6f5cb07cab440eb52a1d47cb70ca23/vendor/bundle/ruby/2.0.0/gems/uglifier-2.7.0/lib/uglifier.rb:178:in `compile'
remote: /tmp/build_eb6f5cb07cab440eb52a1d47cb70ca23/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/uglifier_compressor.rb:25:in `evaluate'
remote: /tmp/build_eb6f5cb07cab440eb52a1d47cb70ca23/vendor/bundle/ruby/2.0.0/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'
remote: /tmp/build_eb6f5cb07cab440eb52a1d47cb70ca23/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/context.rb:197:in `block in evaluate'
remote: /tmp/build_eb6f5cb07cab440eb52a1d47cb70ca23/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/context.rb:194:in `each'
remote: /tmp/build_eb6f5cb07cab440eb52a1d47cb70ca23/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/context.rb:194:in `evaluate'
remote: /tmp/build_eb6f5cb07cab440eb52a1d47cb70ca23/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/bundled_asset.rb:25:in `initialize'
remote: /tmp/build_eb6f5cb07cab440eb52a1d47cb70ca23/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/base.rb:377:in `new'
remote: /tmp/build_eb6f5cb07cab440eb52a1d47cb70ca23/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/base.rb:377:in `build_asset'
remote: /tmp/build_eb6f5cb07cab440eb52a1d47cb70ca23/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/index.rb:94:in `block in build_asset'
remote: /tmp/build_eb6f5cb07cab440eb52a1d47cb70ca23/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/caching.rb:58:in `cache_asset'
remote: /tmp/build_eb6f5cb07cab440eb52a1d47cb70ca23/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/index.rb:93:in `build_asset'
remote: /tmp/build_eb6f5cb07cab440eb52a1d47cb70ca23/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/base.rb:287:in `find_asset'
remote: /tmp/build_eb6f5cb07cab440eb52a1d47cb70ca23/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/index.rb:61:in `find_asset'
remote: /tmp/build_eb6f5cb07cab440eb52a1d47cb70ca23/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/manifest.rb:211:in `block in find_asset'
remote: /tmp/build_eb6f5cb07cab440eb52a1d47cb70ca23/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/manifest.rb:257:in `benchmark'
remote: /tmp/build_eb6f5cb07cab440eb52a1d47cb70ca23/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/manifest.rb:210:in `find_asset'
remote: /tmp/build_eb6f5cb07cab440eb52a1d47cb70ca23/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/manifest.rb:119:in `block in compile'
remote: /tmp/build_eb6f5cb07cab440eb52a1d47cb70ca23/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/manifest.rb:118:in `each'
remote: /tmp/build_eb6f5cb07cab440eb52a1d47cb70ca23/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/manifest.rb:118:in `compile'
remote: /tmp/build_eb6f5cb07cab440eb52a1d47cb70ca23/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.2.2/lib/sprockets/rails/task.rb:70:in `block (3 levels) in define'
remote: /tmp/build_eb6f5cb07cab440eb52a1d47cb70ca23/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/rake/sprocketstask.rb:146:in `with_logger'
remote: /tmp/build_eb6f5cb07cab440eb52a1d47cb70ca23/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.2.2/lib/sprockets/rails/task.rb:69:in `block (2 levels) in define'
remote: Tasks: TOP => assets:precompile
remote: (See full trace by running task with --trace)
gem 文件 来源'https://rubygems.org ' ruby '2.0.0'
gem 'rails', '4.2.0'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'bootstrap-sass', '~> 3.3.3'
gem 'autoprefixer-rails'
group :development, :test do
gem 'byebug'
gem 'web-console', '~> 2.0'
gem 'spring'
gem 'sqlite3'
end
group :production do
gem 'pg'
gem 'rails_12factor'
end
group :doc do
gem 'sdoc', '~> 0.4.0', require: false
end
/welcome.js
(function($) {
var $container = $(".parallax");
var $divs = $container.find("div.parallax-background");
var thingBeingScrolled = document.body;
var liHeight = $divs.eq(0).closest("li").height();
var diffHeight = $divs.eq(0).height() - liHeight;
var i,len,li,offset,scroll,top;
var render = function() {
top = thingBeingScrolled.scrollTop;
//loop through divs
for(i=0,len=$divs.length;i<len;i++) {
//get one div
div = $divs[i];
//get the parent LI
li = div.parentNode;
//calculate the offsetTOP of the div
offset = $(div).offset().top
//calculate the amount to scroll
scroll = Math.round(((top - offset)/liHeight) * diffHeight);
//apply scroll amount
div.style.webkitTransform = "translate3d(0px,"+scroll+"px,0px)";
}
};
(function loop(){
requestAnimationFrame(loop);
render();
})();
})(jQuery);
最佳答案
从任何 .js 文件中删除以“#”开头的注释行
关于javascript - ExecJS::ProgramError:意外字符 '#',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28316650/
我正在尝试部署到 Heroku,但遇到了此错误。我做了一些研究,并在查看相关帖子后尝试卸载并重新安装一些 gem,但我不太确定这里出了什么问题,因为我不熟悉实际问题是什么。请帮忙!我应该怎么办?到目前
错误页面: 这是 application.html.erb 文件: YoutupediaBlog true %> true %> 这两天我一直在寻找这个问题的解决
在我们的rails rfq.js.coffee中,只有一段简单的js代码: $(function() { $('#need_report').change(function(){ if (
在安装了 Ruby 2.3.3、Rails 5.0.0.1 和 NodeJS 4.2.6 的 Ubuntu 16.04 上,我使用 bin/rails generate controller welc
我创建了一个 JavaScript 类(名为 BarChart),它具有构造函数和多个初始化方法。 我执行了以下命令为生产环境预编译 Assets ,但出现错误。 用于预编译 Assets 的命令:r
将 JavaScript 添加到我的网络应用程序后,我现在收到以下错误: ExecJS::ProgramError in Listings#index [stdin]:16:5: error: une
我的应用程序在本地环境中运行良好。我正在尝试 git push 构建到 heroku。我的命令是: bundle install git add . git commit -am "abcdef" g
我尝试过使用git push到托管服务(不是heroku)。我在 Windows 上输入了以下命令。 提取 Assets :预编译 git add 。 git commit -m "xxx" git
我正在尝试部署我的 rails 应用程序但收到此错误: remote: rake aborted! remote: ExecJS::ProgramError: Unexpe
这是我的确切错误图像的链接: http://puu.sh/fHXJf/f714496a53.png 这是我的其余代码,可能是问题 这是在我的 Gemsfile 中: source 'https://r
启动一个新应用程序,当我创建一个 Controller 页面主页并尝试转到本地主机:3000/pages/home 时,出现以下错误: Showing c:/Users/Doesha/desktop/
我正在尝试使用以下命令为 Rails 4.1.1 应用程序编译 Assets 错误。 错误如下所示, $ RAILS_ENV=production bundle exec rake assets:pr
我正在尝试向我的 rails 应用程序添加登录注销功能。为此,我添加了 bcrypt gem 用于密码加密和访问 Controller 。现在,当我在本地运行它时,收到一条错误消息。在添加上述功能之前
首先,如果我没有尽可能清楚地解释我的问题,我很抱歉,我是 Ruby on Rails 的新手,这是我第一次在这里真正提出问题而不是立即在这里找到答案。 我正在阅读 Ruby on Rails 4 基本
我是 Ruby on Rails 的新手,我费了很大的劲才在我的 Windows 8 机器上安装了该软件。现在我只关注this guide创建示例 Hello World 示例。 当我尝试按照4.3
嘿,大家好,我正在尝试在 Heroku 上部署我的 ruby on Rails 4 应用程序,但在执行时遇到问题。我使用 sqlite3 并且我已经尝试了一切。 这是最后阶段的错误: 远程:---
尝试将 Rails 5 应用程序部署到 heroku 时,出现以下错误,当它到达 Running: rake assets:precompile 时: remote: ExecJS::P
部署我的 Rails 应用程序时出现以下错误: rake aborted! ExecJS::ProgramError: Unexpected token punc «(», expected p
我在将 Rails 项目推送到 heroku 时遇到问题。我收到“预编译 Assets 失败”消息。我是编程新手,也是 ruby on rails 新手。我真的需要一些帮助。这是我的命令行中的文本
我是一名优秀的程序员,十分优秀!