ExecJS::ProgramError: Unexpected character '#' - javascript

I'm trying to deploy to Heroku and I am met with this error. I've done some research and tried uninstalling and reinstalling some gems after looking at relevant posts but I'm not really sure what's wrong here as I am not familiar with what the actual problem is. Please help! What should I do? So far I'm thinking it has something to do with the 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 file
source '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);

remove the comment line which is start with "#" from any of your .js file

Related

Heroku buildpack horse ignoring node version in package.json

I am a fairly newbie Meteor developer trying to get an app to deploy to a Heroku server.
The main issue is that bcrypt needs a newer version of node in order to work and for some reason, the node version specified in 'engines' in package.json does not work with AdmitHub's buildpack horse for meteor - it keeps using a much older version that isn't recommended (node v0.10.48 and npm v2.15.1) for both the bcrypt version I am running (3.0.6) and Meteor (1.8.1). I am trying to use Node v10.16.2 and npm v6.10.3
I have tried ensuring that the project name is matched by the repo name in the package.json, setting it to a few different versions.
I have also tested the use of the node buildpack and it gets the right versions when using that json but, it won't run due to it not being the meteor buildpack.
#Package.json#
{
"name": "XXXXXXXXX",
"version": "5.4.0",
"private": true,
"engines":{"npm":"6.10.3", "node":"10.16.2"},
"scripts": {
"tsc": "tsc react-meteor-data.ts",
"postinstall": "run-s build:*",
"start": "run-s build watch:server",
"test": "run-p lint ava",
"test:server": "meteor test --once --driver-package
dispatch:mocha --port 3100 --settings settings.test.json",
"test:server:watch": "TEST_WATCH=1 meteor test --driver-
package dispatch:mocha --port 3100 --settings settings.test.json",
"ava": "NODE_ENV=test ava --verbose tests",
"lint": "standard | snazzy",
"lint:fix": "standard --fix",
"build": "run-s build:*",
"build:css": "postcss --config ./postcss.config.js --output ./client/bundle.css ./imports/ui/main.css",
"watch": "run-p watch:*",
"watch:css": "nodemon --quiet --watch ./imports/ui --ext css --exec npm run build:css",
"watch:server": "meteor run --settings settings.json"
},
"dependencies": {
"#types/react": "^16.9.2",
"assert": "^2.0.0",
"async": "^2.6.3",
"autoprefixer": "^6.5.1",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-preset-es2015": "^6.16.0",
"babel-preset-react": "^6.16.0",
"babel-register": "^6.26.0",
"babel-runtime": "6.18.0",
"basscss": "^8.1.0",
"basscss-background-colors": "^2.1.0",
"basscss-colors": "^2.2.0",
"basscss-responsive-margin": "^1.1.0",
"basscss-responsive-padding": "^1.1.0",
"bcrypt": "^3.0.6",
"child_process": "^1.0.2",
"classnames": "^2.2.6",
"create-react-class": "^15.6.3",
"crypto": "^1.0.1",
"debug": "^2.6.9",
"deep-equal": "^1.0.1",
"escape-string-regexp": "^1.0.5",
"event-loop-lag": "^1.4.0",
"fibers": "^4.0.1",
"fs": "0.0.1-security",
"he": "^1.2.0",
"iso-3166-1-alpha-2": "^1.0.0",
"joi-browser": "^10.6.1",
"jquery": "^3.4.1",
"lodash": "^4.17.15",
"meteor-babel": "^7.5.7",
"meteor-babel-helpers": "0.0.3",
"meteor-node-stubs": "~0.2.0",
"meteor-promise": "^0.8.7",
"meteor-user-roles": "^1.1.7",
"moment": "^2.24.0",
"mongodb": "^3.3.0",
"node-diff": "^0.2.0",
"node4mailer": "^4.0.3",
"npm-run-all": "^3.1.1",
"os": "^0.1.1",
"path": "^0.12.7",
"postcss": "^5.2.18",
"postcss-calc": "^5.3.1",
"postcss-cli": "^2.6.0",
"postcss-custom-media": "^5.0.1",
"postcss-custom-properties": "^5.0.1",
"postcss-easy-import": "^1.0.1",
"postcss-functions": "^2.1.1",
"postcss-import": "^8.1.2",
"prop-types": "^15.7.2",
"query-string": "^6.8.2",
"react": "^16.9.0",
"react-addons-pure-render-mixin": "^15.6.2",
"react-day-picker": "^7.3.2",
"react-dom": "^16.9.0",
"react-helmet": "^5.2.1",
"react-router-dom": "^5.0.1",
"semver": "^6.3.0",
"smartsurvey-client": "^1.2.0",
"source-map-support": "^0.5.13",
"underscore": "^1.9.1",
"url": "^0.11.0"
},
"devDependencies": {
"ava": "^0.19.1",
"babel-eslint": "^7.2.2",
"enzyme": "^3.10.0",
"faker": "^4.1.0",
"nodemon": "^1.19.1",
"pre-commit": "^1.1.3",
"snazzy": "^7.1.1",
"standard": "^10.0.3"
},
"ava": {
"babel": "inherit",
"require": [
"babel-register"
]
},
"standard": {
"parser": "babel-eslint"
}
}
#Console Log#
git push heroku master
Enumerating objects: 200, done.
Counting objects: 100% (200/200), done.
Delta compression using up to 4 threads
Compressing objects: 100% (107/107), done.
Writing objects: 100% (111/111), 115.45 KiB | 2.31 MiB/s, done.
Total 111 (delta 49), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Node.js app detected
remote: -----> Installing node
remote: -----> Installing meteor
remote: Downloading Meteor distribution
remote:
remote: Meteor 1.8.1 has been installed in your home directory (~/.meteor).
remote:
remote: Now you need to do one of the following:
remote:
remote: (1) Add "$HOME/.meteor" to your path, or
remote: (2) Run this command as root:
remote: cp "/app/tmp/buildpacks/70b014ca5f012fbcd571457366ff69b27da3ac5fa3f75060cd18fbc3bb7e4197c59b93620c093e230d716bdebaaf233e031e247f905457a1aeae6c4cdd57a918/meteor-Llwd/.meteor/packages/meteor-tool/1.8.1/mt-os.linux.x86_64/scripts/admin/launch-meteor" /usr/bin/meteor
remote:
remote: Then to get started, take a look at 'meteor --help' or see the docs at
remote: docs.meteor.com.
remote: npm WARN deprecated crypto#1.0.1: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
remote: npm WARN deprecated babel-preset-es2015#6.24.1: 🙌 Thanks for using Babel: we recommend using babel-preset-env now: please read https://babeljs.io/env to update!
remote: npm WARN engine bcrypt#3.0.6: wanted: {"node":">= 6.0.0"} (current: {"node":"0.10.48","npm":"2.15.1"})
remote: npm WARN engine node4mailer#4.0.3: wanted: {"node":">=4.0.0"} (current:
remote: npm WARN engine randexp#0.4.6: wanted: {"node":">=0.12"} (current: {"node":"0.10.48","npm":"2.15.1"})// does this warning for virtually all pacakages
remote:
remote: > bcrypt#3.0.6 install /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/bcrypt
remote: > node-pre-gyp install --fallback-to-build
remote:
remote: node-pre-gyp WARN Using needle for node-pre-gyp https download
remote:
remote: /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/bcrypt/node_modules/node-pre-gyp/node_modules/tar/lib/create.js:4
remote: const hlo = require('./high-level-opt.js')
remote: ^^^^^
remote: node-pre-gyp ERR! UNCAUGHT EXCEPTION
remote: node-pre-gyp ERR! stack SyntaxError: Use of const in strict mode.
remote: node-pre-gyp ERR! stack at Module._compile (module.js:439:25)
remote: node-pre-gyp ERR! stack at Object.Module._extensions..js (module.js:474:10)
remote: node-pre-gyp ERR! stack at Module.load (module.js:356:32)
remote: node-pre-gyp ERR! stack at Function.Module._load (module.js:312:12)
remote: node-pre-gyp ERR! stack at Module.require (module.js:364:17)
remote: node-pre-gyp ERR! stack at require (module.js:380:17)
remote: node-pre-gyp ERR! stack at Object.<anonymous> (/tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/bcrypt/node_modules/node-pre-gyp/node_modules/tar/index.js:4:30)
remote: node-pre-gyp ERR! stack at Module._compile (module.js:456:26)
remote: node-pre-gyp ERR! stack at Object.Module._extensions..js (module.js:474:10)
remote: node-pre-gyp ERR! stack at Module.load (module.js:356:32)
remote: node-pre-gyp ERR! System Linux 4.4.0-1048-aws
remote: node-pre-gyp ERR! command "node" "/tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/bcrypt/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
remote: node-pre-gyp ERR! cwd /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/bcrypt
remote: node-pre-gyp ERR! node -v v0.10.48
remote: node-pre-gyp ERR! node-pre-gyp -v v0.12.0
remote: node-pre-gyp ERR! This is a bug in `node-pre-gyp`.
remote: node-pre-gyp ERR! Try to update node-pre-gyp and file an issue if it does not help:
remote: node-pre-gyp ERR! <https://github.com/mapbox/node-pre-gyp/issues>
remote: npm WARN engine ret#0.1.15: wanted: {"node":">=0.12"} (current: {"node":"0.10.48","npm":"2.15.1"})
remote:
remote: > nodemon#1.19.2 postinstall /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/nodemon
remote: > node bin/postinstall || exit 0
remote:
remote: Love nodemon? You can now support the project via the open collective:
remote: > https://opencollective.com/nodemon/donate
remote:
remote: npm WARN engine request#2.88.0: wanted: {"node":">= 4"} (current: {"node":"0.10.48","npm":"2.15.1"})
remote:
remote: > fibers#4.0.1 install /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/fibers
remote: > node build.js || nodejs build.js
remote:
remote: make: Entering directory '/tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/fibers/build'
remote: CXX(target) Release/obj.target/fibers/src/fibers.o
remote: ../src/fibers.cc: In function ‘v8::Handle<v8::Object> uni::NewInstance(v8::Isolate*, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’:
remote: ../src/fibers.cc:120:38: error: ‘class v8::Local<v8::Object>’ has no member named ‘ToLocalChecked’
remote: return fn->NewInstance(argc, argv).ToLocalChecked();
remote: ^~~~~~~~~~~~~~
remote: ../src/fibers.cc: In function ‘void uni::SetAccessor(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::String>, uni::FunctionType (*)(v8::Local<v8::String>, const GetterCallbackInfo&), void (*)(v8::Local<v8::String>, v8::Local<v8::Value>, const SetterCallbackInfo&))’:
remote: ../src/fibers.cc:378:30: error: ‘AccessorNameGetterCallback’ was not declared in this scope
remote: object->SetAccessor(name, (AccessorNameGetterCallback)getter, (AccessorNameSetterCallback)setter);
remote: ^~~~~~~~~~~~~~~~~~~~~~~~~~
remote: ../src/fibers.cc:378:66: error: ‘AccessorNameSetterCallback’ was not declared in this scope
remote: object->SetAccessor(name, (AccessorNameGetterCallback)getter, (AccessorNameSetterCallback)setter);
remote: ^~~~~~~~~~~~~~~~~~~~~~~~~~
remote: ../src/fibers.cc: In static member function ‘static uni::FunctionType Fiber::New(const Arguments&)’:
remote: ../src/fibers.cc:546:91: error: could not convert ‘uni::Deref<v8::FunctionTemplate>(v8::Isolate::GetCurrent(), Fiber::tmpl)’ from ‘v8::Handle<v8::FunctionTemplate>’ to ‘v8::Local<v8::FunctionTemplate>’
remote: return uni::Return(uni::NewInstance(Isolate::GetCurrent(), uni::GetFunction(uni::Deref(Isolate::GetCurrent(), tmpl)), 1, argv), args);
remote: ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
remote: ../src/fibers.cc:550:76: error: no matching function for call to ‘Fiber::Fiber(v8::Local<v8::Object>, v8::Local<v8::Function>&, v8::Handle<v8::Context>)’
remote: new Fiber(args.This(), fn, uni::GetCurrentContext(Isolate::GetCurrent()));
remote: ^
remote: ../src/fibers.cc:435:3: note: candidate: Fiber::Fiber(v8::Local<v8::Object>, v8::Local<v8::Function>, v8::Local<v8::Context>)
remote: Fiber(Local<Object> handle, Local<Function> cb, Local<Context> v8_context) :
remote: ^~~~~
remote: ../src/fibers.cc:435:3: note: no known conversion for argument 3 from ‘v8::Handle<v8::Context>’ to ‘v8::Local<v8::Context>’
remote: ../src/fibers.cc:405:7: note: candidate: constexpr Fiber::Fiber(const Fiber&)
remote: class Fiber {
remote: ^~~~~
remote: ../src/fibers.cc:405:7: note: candidate expects 1 argument, 3 provided
remote: ../src/fibers.cc: In static member function ‘static uni::FunctionType Fiber::Reset(const Arguments&)’:
remote: ../src/fibers.cc:637:33: error: conversion from ‘v8::Handle<v8::Value>’ to non-scalar type ‘v8::Local<v8::Value>’ requested
remote: Local<Value> val = uni::Deref(that.isolate, that.yielded);
remote: ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
remote: ../src/fibers.cc: In member function ‘v8::Local<v8::Value> Fiber::ReturnYielded()’:
remote: ../src/fibers.cc:705:33: error: conversion from ‘v8::Handle<v8::Value>’ to non-scalar type ‘v8::Local<v8::Value>’ requested
remote: Local<Value> val = uni::Deref(isolate, yielded);
remote: ~~~~~~~~~~^~~~~~~~~~~~~~~~~~
remote: ../src/fibers.cc:708:31: error: could not convert ‘uni::ThrowException(((Fiber*)this)->Fiber::isolate, val.v8::Local<v8::Value>::<anonymous>)’ from ‘v8::Handle<v8::Value>’ to ‘v8::Local<v8::Value>’
remote: return uni::ThrowException(isolate, val);
remote: ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
remote: ../src/fibers.cc: In static member function ‘static void Fiber::RunFiber(void**)’:
remote: ../src/fibers.cc:736:43: error: conversion from ‘v8::Handle<v8::Context>’ to non-scalar type ‘v8::Local<v8::Context>’ requested
remote: Local<Context> v8_context = uni::Deref(that.isolate, that.v8_context);
remote: ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
remote: ../src/fibers.cc:744:36: error: could not convert ‘uni::Deref<v8::Function>(that.Fiber::isolate, that.Fiber::cb)’ from ‘v8::Handle<v8::Function>’ to ‘v8::Local<v8::Function>’
remote: yielded = uni::Call(uni::Deref(that.isolate, that.cb), v8_context->Global(), 1, argv);
remote: ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
remote: ../src/fibers.cc:746:36: error: could not convert ‘uni::Deref<v8::Function>(that.Fiber::isolate, that.Fiber::cb)’ from ‘v8::Handle<v8::Function>’ to ‘v8::Local<v8::Function>’
remote: yielded = uni::Call(uni::Deref(that.isolate, that.cb), v8_context->Global(), 0, NULL);
remote: ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
remote: ../src/fibers.cc: In static member function ‘static void Fiber::Init(v8::Local<v8::Object>)’:
remote: ../src/fibers.cc:877:59: error: conversion from ‘v8::Handle<v8::FunctionTemplate>’ to non-scalar type ‘v8::Local<v8::FunctionTemplate>’ requested
remote: Local<FunctionTemplate> tmpl = uni::NewFunctionTemplate(isolate, New);
remote: ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
remote: ../src/fibers.cc:883:44: error: conversion from ‘v8::Handle<v8::Signature>’ to non-scalar type ‘v8::Local<v8::Signature>’ requested
remote: Local<Signature> sig = uni::NewSignature(isolate, tmpl);
remote: ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
remote: ../src/fibers.cc:897:69: error: could not convert ‘uni::NewFunctionTemplate(isolate, Fiber::Yield_, v8::Handle<v8::Value>(), v8::Handle<v8::Signature>(), 0)’ from ‘v8::Handle<v8::FunctionTemplate>’ to ‘v8::Local<v8::FunctionTemplate>’
remote: Local<Function> yield = uni::GetFunction(uni::NewFunctionTemplate(isolate, Yield_));
remote: ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
remote: ../src/fibers.cc:898:50: error: conversion from ‘v8::Handle<v8::String>’ to non-scalar type ‘v8::Local<v8::String>’ requested
remote: Local<String> sym_yield = uni::NewLatin1Symbol(isolate, "yield");
remote: ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
remote: ../src/fibers.cc:904:54: error: could not convert ‘uni::NewLatin1Symbol(isolate, ((const char*)"current"))’ from ‘v8::Handle<v8::String>’ to ‘v8::Local<v8::String>’
remote: uni::SetAccessor(isolate, fn, uni::NewLatin1Symbol(isolate, "current"), GetCurrent);
remote: ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
remote: ../src/fibers.cc:905:54: error: could not convert ‘uni::NewLatin1Symbol(isolate, ((const char*)"poolSize"))’ from ‘v8::Handle<v8::String>’ to ‘v8::Local<v8::String>’
remote: uni::SetAccessor(isolate, fn, uni::NewLatin1Symbol(isolate, "poolSize"), GetPoolSize, SetPoolSize);
remote: ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
remote: ../src/fibers.cc:906:54: error: could not convert ‘uni::NewLatin1Symbol(isolate, ((const char*)"fibersCreated"))’ from ‘v8::Handle<v8::String>’ to ‘v8::Local<v8::String>’
remote: uni::SetAccessor(isolate, fn, uni::NewLatin1Symbol(isolate, "fibersCreated"), GetFibersCreated);
remote: ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
remote: fibers.target.mk:99: recipe for target 'Release/obj.target/fibers/src/fibers.o' failed
remote: make: *** [Release/obj.target/fibers/src/fibers.o] Error 1
remote: make: Leaving directory '/tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/fibers/build'
remote: gyp ERR! build error
remote: gyp ERR! stack Error: `make` failed with exit code: 2
remote: gyp ERR! stack at ChildProcess.onExit (/tmp/build_0838344e4b1148e9844c2ce1a37e95dc/.meteor/heroku_build/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
remote: gyp ERR! stack at ChildProcess.emit (events.js:98:17)
remote: gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:820:12)
remote: gyp ERR! System Linux 4.4.0-1048-aws
remote: gyp ERR! command "node" "/tmp/build_0838344e4b1148e9844c2ce1a37e95dc/.meteor/heroku_build/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
remote: gyp ERR! cwd /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/fibers
remote: gyp ERR! node -v v0.10.48
remote: gyp ERR! node-gyp -v v3.3.1
remote: gyp ERR! not ok
remote: node-gyp exited with code: 1
remote: Please make sure you are using a supported platform and node version. If you
remote: would like to compile fibers on this machine please make sure you have setup your
remote: build environment--
remote: Windows + OS X instructions here: https://github.com/nodejs/node-gyp
remote: Ubuntu users please run: `sudo apt-get install g++ build-essential`
remote: RHEL users please run: `yum install gcc-c++` and `yum groupinstall 'Development Tools'`
remote: Alpine users please run: `sudo apk add python make g++`
remote: sh: 1: nodejs: not found
remote: > core-js#2.6.9 postinstall /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/babel-register/node_modules/core-js
remote: > node scripts/postinstall || echo "ignore"
remote: > core-js#2.6.9 postinstall /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/babel-preset-es2015/node_modules/babel-plugin-transform-es2015-modules-amd/node_modules/babel-runtime/node_modules/core-js
remote: > node scripts/postinstall || echo "ignore"
remote: > core-js#2.6.9 postinstall /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/babel-preset-es2015/node_modules/babel-plugin-transform-es2015-block-scoping/node_modules/babel-runtime/node_modules/core-js
remote: > node scripts/postinstall || echo "ignore"
remote: > core-js#2.6.9 postinstall /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/babel-preset-es2015/node_modules/babel-plugin-transform-es2015-block-scoped-functions/node_modules/babel-runtime/node_modules/core-js
remote: > node scripts/postinstall || echo "ignore"
remote: > core-js#2.6.9 postinstall /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/babel-preset-es2015/node_modules/babel-plugin-transform-es2015-typeof-symbol/node_modules/babel-runtime/node_modules/core-js
remote: > node scripts/postinstall || echo "ignore"
remote: > core-js#2.6.9 postinstall /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/babel-preset-es2015/node_modules/babel-plugin-transform-es2015-modules-umd/node_modules/babel-runtime/node_modules/core-js
remote: > node scripts/postinstall || echo "ignore"
remote: > core-js#2.6.9 postinstall /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/babel-preset-es2015/node_modules/babel-plugin-transform-es2015-computed-properties/node_modules/babel-runtime/node_modules/core-js
remote: > node scripts/postinstall || echo "ignore"
remote: > core-js#2.6.9 postinstall /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/babel-preset-es2015/node_modules/babel-plugin-transform-es2015-function-name/node_modules/babel-runtime/node_modules/core-js
remote: > node scripts/postinstall || echo "ignore"
remote: > core-js#2.6.9 postinstall /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/babel-preset-es2015/node_modules/babel-plugin-transform-es2015-template-literals/node_modules/babel-runtime/node_modules/core-js
remote: > node scripts/postinstall || echo "ignore"
remote: > core-js#2.6.9 postinstall /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/babel-preset-es2015/node_modules/babel-plugin-transform-es2015-arrow-functions/node_modules/babel-runtime/node_modules/core-js
remote: > node scripts/postinstall || echo "ignore"
remote: > core-js#2.6.9 postinstall /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/babel-preset-react/node_modules/babel-plugin-transform-react-jsx-source/node_modules/babel-runtime/node_modules/core-js
remote: > node scripts/postinstall || echo "ignore"
remote: > core-js#2.6.9 postinstall /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/babel-preset-react/node_modules/babel-plugin-transform-react-jsx-self/node_modules/babel-runtime/node_modules/core-js
remote: > node scripts/postinstall || echo "ignore"
remote: > core-js#2.6.9 postinstall /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/babel-preset-es2015/node_modules/babel-plugin-transform-es2015-shorthand-properties/node_modules/babel-runtime/node_modules/core-js
remote: > node scripts/postinstall || echo "ignore":
remote: > core-js#2.6.9 postinstall /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/babel-plugin-transform-class-properties/node_modules/babel-runtime/node_modules/core-js
remote: > node scripts/postinstall || echo "ignore"
remote: > core-js#2.6.9 postinstall /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/babel-preset-es2015/node_modules/babel-plugin-transform-es2015-literals/node_modules/babel-runtime/node_modules/core-js
remote: > node scripts/postinstall || echo "ignore"
remote: > core-js#2.6.9 postinstall /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/babel-preset-es2015/node_modules/babel-plugin-transform-es2015-duplicate-keys/node_modules/babel-runtime/node_modules/core-js
remote: > node scripts/postinstall || echo "ignore"
remote: > core-js#2.6.9 postinstall /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/babel-preset-es2015/node_modules/babel-plugin-transform-es2015-spread/node_modules/babel-runtime/node_modules/core-js
remote: > node scripts/postinstall || echo "ignore"
remote: > core-js#2.6.9 postinstall /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/babel-preset-es2015/node_modules/babel-plugin-transform-es2015-destructuring/node_modules/babel-runtime/node_modules/core-js
remote: > node scripts/postinstall || echo "ignore"
remote: > core-js#2.6.9 postinstall /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/babel-preset-es2015/node_modules/babel-plugin-transform-es2015-for-of/node_modules/babel-runtime/node_modules/core-js
remote: > node scripts/postinstall || echo "ignore"
remote: > core-js#2.6.9 postinstall /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/babel-preset-react/node_modules/babel-plugin-transform-react-display-name/node_modules/babel-runtime/node_modules/core-js
remote: > node scripts/postinstall || echo "ignore"
remote: > core-js#2.6.9 postinstall /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/babel-preset-es2015/node_modules/babel-plugin-check-es2015-constants/node_modules/babel-runtime/node_modules/core-js
remote: > node scripts/postinstall || echo "ignore"
remote: > core-js#2.6.9 postinstall /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/babel-runtime/node_modules/core-js
7e95dc/node_modules/ava/node_modules/#ava/babel-preset-transform-test-files/node_modules/babel-plugin-espower/node_modules/core-js
remote: > core-js#2.6.9 postinstall /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/ava/node_modules/babel-core/node_modules/babel-runtime/node_modules/core-js
remote: > node scripts/postinstall || echo "ignore"
remote: > core-js#2.6.9 postinstall /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/babel-preset-es2015/node_modules/babel-plugin-transform-regenerator/node_modules/regenerator-transform/node_modules/babel-types/node_modules/babel-runtime/node_modules/core-js
remote: > node scripts/postinstall || echo "ignore"
remote: > core-js#2.6.9 postinstall /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/ava/node_modules/#ava/babel-preset-stage-4/node_modules/babel-plugin-check-es2015-constants/node_modules/babel-runtime/node_modules/core-js
remote: > node scripts/postinstall || echo "ignore"
remote: > core-js#2.6.9 postinstall /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/ava/node_modules/#ava/babel-preset-stage-4/node_modules/babel-plugin-transform-es2015-spread/node_modules/babel-runtime/node_modules/core-js
remote: > node scripts/postinstall || echo "ignore"
remote: > core-js#2.6.9 postinstall /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/ava/node_modules/#ava/babel-preset-stage-4/node_modules/babel-plugin-transform-es2015-destructuring/node_modules/babel-runtime/node_modules/core-js
remote: > node scripts/postinstall || echo "ignore"
remote: > core-js#2.6.9 postinstall /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/ava/node_modules/#ava/babel-preset-stage-4/node_modules/babel-plugin-transform-es2015-sticky-regex/node_modules/babel-runtime/node_modules/core-js
remote: > node scripts/postinstall || echo "ignore"
remote: > core-js#2.6.9 postinstall /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/ava/node_modules/#ava/babel-preset-stage-4/node_modules/babel-plugin-transform-es2015-unicode-regex/node_modules/babel-runtime/node_modules/core-/tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/ava/node_modules/#ava/babel-preset-stage-4/node_modules/babel-plugin-transform-es2015-modules-commonjs/node_modules/babel-runtime/node_modules/core-js
remote: > core-js#2.6.9 postinstall /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/ava/node_modules/#ava/babel-preset-stage-4/node_modules/babel-plugin-transform-exponentiation-operator/node_modules/babel-runtime/node_modules/core-js
remote: > node scripts/postinstall || echo "ignore"
remote: > core-js#2.6.9 postinstall /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/ava/node_modules/#ava/babel-preset-stage-4/node_modules/babel-plugin-transform-async-to-generator/node_modules/babel-runtime/node_modules/core-js
remote: > node scripts/postinstall || echo "ignore"
remote: > core-js#2.6.9 postinstall /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/postcss-import/node_modules/pkg-resolve/node_modules/jspm/node_modules/systemjs-builder/node_modules/babel-plugin-transform-es2015-modules-systemjs/node_modules/babel-runtime/node_modules/core-js
remote: > node scripts/postinstall || echo "ignore"
remote: > core-js#2.6.9 postinstall /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/postcss-import/node_modules/pkg-resolve/node_modules/jspm/node_modules/systemjs-builder/node_modules/babel-plugin-transform-global-system-wrapper/node_modules/babel-template/node_modules/babel-runtime/node_modules/core-js
remote: > node scripts/postinstall || echo "ignore"
remote: > core-js#2.6.9 postinstall /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/postcss-import/node_modules/pkg-resolve/node_modules/jspm/node_modules/systemjs-builder/node_modules/babel-core/node_modules/babel-runtime/node_modules/core-js
remote: > node scripts/postinstall || echo "ignore"
remote: > core-js#2.6.9 postinstall /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/postcss-import/node_modules/pkg-resolve/node_modules/jspm/node_modules/systemjs-builder/node_modules/babel-plugin-transform-cjs-system-wrapper/node_modules/babel-template/node_modules/babel-runtime/node_modules/core-js
remote: > node scripts/postinstall || echo "ignore"
remote: > core-js#2.6.9 postinstall /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/node_modules/postcss-import/node_modules/pkg-resolve/node_modules/jspm/node_modules/systemjs-builder/node_modules/babel-plugin-transform-amd-system-wrapper/node_modules/babel-template/node_modules/babel-runtime/node_modules/core-js
remote: > node scripts/postinstall || echo "ignore"
remote: npm ERR! Linux 4.4.0-1048-aws
remote: npm ERR! argv "/tmp/build_0838344e4b1148e9844c2ce1a37e95dc/.meteor/heroku_build/bin/node" "/tmp/build_0838344e4b1148e9844c2ce1a37e95dc/.meteor/heroku_build/bin/npm" "install"
remote: npm ERR! node v0.10.48
remote: npm ERR! npm v2.15.1
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! bcrypt#3.0.6 install: `node-pre-gyp install --fallback-to-build`
remote: npm ERR! Exit status 7
remote: npm ERR! Failed at the bcrypt#3.0.6 install script 'node-pre-gyp install --fallback-to-build'.
remote: npm ERR! This is most likely a problem with the bcrypt package,
remote: npm ERR! not with npm itself.
remote: npm ERR! Tell the author that this fails on your system:
remote: npm ERR! node-pre-gyp install --fallback-to-build
remote: npm ERR! You can get information on how to open an issue for this project with:
remote: npm ERR! npm bugs bcrypt
remote: npm ERR! Or if that isn't available, you can get their info via:
remote: npm ERR! npm owner ls bcrypt
remote: npm ERR! There is likely additional logging output above.
remote: npm ERR! Please include the following file with any support request:
remote: npm ERR! /tmp/build_0838344e4b1148e9844c2ce1a37e95dc/npm-debug.log
remote: ! Push rejected, failed to compile Node.js app.
remote: ! Push failed
r
Fixed the issue Add the $HOME environment variable after deployment, don't know why but it worked after that.

Deploying app on Heroku with Rails (error 500)

I am trying to deploy my application on Heroku, but it is showing following error
"We're sorry, but something went wrong."
So I've check my heroku logs, here is 2 problems I have
2019-05-22T13:56:04.512197+00:00 heroku[router]: at=info method=GET path="/" host=concierge-at-sea.herokuapp.com request_id=4f5fe5ef-ab45-4012-97be-87de88b8fdb5 fwd="89.95.71.184" dyno=web.1 connect=0ms service=1496ms status=500 bytes=1827 protocol=https
2019-05-22T13:55:35.566494+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2019-05-22T13:55:35.686117+00:00 heroku[web.1]: Process exited with status 143
This is for an app with devise, I've already tried heroku restart in order to restart my dyno's
But I don't understand the error 500, in local everything works
Here is my heroku logs
2019-05-22T13:53:09.716085+00:00 app[web.1]: ],
2019-05-22T13:53:09.716086+00:00 app[web.1]: "js.map": [
2019-05-22T13:53:09.716087+00:00 app[web.1]: "/packs/js/application-b9d827093751ba55443e.js.map"
2019-05-22T13:53:09.716089+00:00 app[web.1]: ]
2019-05-22T13:53:09.716090+00:00 app[web.1]: },
2019-05-22T13:53:09.716091+00:00 app[web.1]: "map": {
2019-05-22T13:53:09.716093+00:00 app[web.1]: "css": [
2019-05-22T13:53:09.716094+00:00 app[web.1]: "/packs/css/map-1c42ce8f.css"
2019-05-22T13:53:09.716096+00:00 app[web.1]: ],
2019-05-22T13:53:09.716097+00:00 app[web.1]: "js": [
2019-05-22T13:53:09.716098+00:00 app[web.1]: "/packs/js/map-c76722abf103111664a2.js"
2019-05-22T13:53:09.716100+00:00 app[web.1]: ],
2019-05-22T13:53:09.716101+00:00 app[web.1]: "js.map": [
2019-05-22T13:53:09.716102+00:00 app[web.1]: "/packs/js/map-c76722abf103111664a2.js.map"
2019-05-22T13:53:09.716104+00:00 app[web.1]: ]
2019-05-22T13:53:09.716105+00:00 app[web.1]: }
2019-05-22T13:53:09.716106+00:00 app[web.1]: },
2019-05-22T13:53:09.716108+00:00 app[web.1]: "map.css": "/packs/css/map-1c42ce8f.css",
2019-05-22T13:53:09.716109+00:00 app[web.1]: "map.js": "/packs/js/map-c76722abf103111664a2.js",
2019-05-22T13:53:09.716110+00:00 app[web.1]: "map.js.map": "/packs/js/map-c76722abf103111664a2.js.map"
2019-05-22T13:53:09.716112+00:00 app[web.1]: }
2019-05-22T13:53:09.716113+00:00 app[web.1]: ):
2019-05-22T13:53:09.716334+00:00 app[web.1]: F, [2019-05-22T13:53:09.716276 #4] FATAL -- : [20ca8723-7451-41e8-ab0d-df5b3e56c777] 7: <%= csrf_meta_tags %>
2019-05-22T13:53:09.716337+00:00 app[web.1]: [20ca8723-7451-41e8-ab0d-df5b3e56c777] 8: <%= action_cable_meta_tag %>
2019-05-22T13:53:09.716338+00:00 app[web.1]: [20ca8723-7451-41e8-ab0d-df5b3e56c777] 9: <%= stylesheet_link_tag 'application', media: 'all' %>
2019-05-22T13:53:09.716340+00:00 app[web.1]: [20ca8723-7451-41e8-ab0d-df5b3e56c777] 10: <%= stylesheet_pack_tag 'application', media: 'all' %>
2019-05-22T13:53:09.716341+00:00 app[web.1]: [20ca8723-7451-41e8-ab0d-df5b3e56c777] 11: <%= stylesheet_pack_tag 'map' %>
2019-05-22T13:53:09.716343+00:00 app[web.1]: [20ca8723-7451-41e8-ab0d-df5b3e56c777] 12: </head>
2019-05-22T13:53:09.716344+00:00 app[web.1]: [20ca8723-7451-41e8-ab0d-df5b3e56c777] 13: <body>
2019-05-22T13:53:09.716426+00:00 app[web.1]: F, [2019-05-22T13:53:09.716369 #4] FATAL -- : [20ca8723-7451-41e8-ab0d-df5b3e56c777]
2019-05-22T13:53:09.716517+00:00 app[web.1]: F, [2019-05-22T13:53:09.716463 #4] FATAL -- : [20ca8723-7451-41e8-ab0d-df5b3e56c777] app/views/layouts/application.html.erb:10:in `_app_views_layouts_application_html_erb___4054649697818533831_47054766793720'
2019-05-22T13:55:34.396458+00:00 heroku[web.1]: Restarting
2019-05-22T13:55:34.681019+00:00 heroku[web.1]: State changed from up to starting
2019-05-22T13:55:35.566494+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2019-05-22T13:55:35.686117+00:00 heroku[web.1]: Process exited with status 143
2019-05-22T13:55:35.579278+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish
2019-05-22T13:55:35.582846+00:00 app[web.1]: === puma shutdown: 2019-05-22 13:55:35 +0000 ===
2019-05-22T13:55:35.582878+00:00 app[web.1]: - Goodbye!
2019-05-22T13:55:41.287394+00:00 heroku[web.1]: Starting process with command `bundle exec puma -C config/puma.rb`
2019-05-22T13:55:43.390424+00:00 app[web.1]: Puma starting in single mode...
2019-05-22T13:55:43.390453+00:00 app[web.1]: * Version 3.12.1 (ruby 2.5.3-p105), codename: Llamas in Pajamas
2019-05-22T13:55:43.390455+00:00 app[web.1]: * Min threads: 5, max threads: 5
2019-05-22T13:55:43.390456+00:00 app[web.1]: * Environment: production
2019-05-22T13:55:45.981837+00:00 heroku[web.1]: State changed from starting to up
2019-05-22T13:55:45.842400+00:00 app[web.1]: * Listening on tcp://0.0.0.0:21575
2019-05-22T13:55:45.842712+00:00 app[web.1]: Use Ctrl-C to stop
2019-05-22T13:56:03.019885+00:00 app[web.1]: I, [2019-05-22T13:56:03.019766 #4] INFO -- : [4f5fe5ef-ab45-4012-97be-87de88b8fdb5] Started GET "/" for 89.95.71.184 at 2019-05-22 13:56:03 +0000
2019-05-22T13:56:03.021420+00:00 app[web.1]: I, [2019-05-22T13:56:03.021348 #4] INFO -- : [4f5fe5ef-ab45-4012-97be-87de88b8fdb5] Processing by Devise::SessionsController#new as HTML
2019-05-22T13:56:03.112359+00:00 app[web.1]: I, [2019-05-22T13:56:03.112174 #4] INFO -- : [4f5fe5ef-ab45-4012-97be-87de88b8fdb5] Rendering devise/sessions/new.html.erb within layouts/application
2019-05-22T13:56:04.512197+00:00 heroku[router]: at=info method=GET path="/" host=concierge-at-sea.herokuapp.com request_id=4f5fe5ef-ab45-4012-97be-87de88b8fdb5 fwd="89.95.71.184" dyno=web.1 connect=0ms service=1496ms status=500 bytes=1827 protocol=https
2019-05-22T13:56:04.509151+00:00 app[web.1]: I, [2019-05-22T13:56:04.509056 #4] INFO -- : [4f5fe5ef-ab45-4012-97be-87de88b8fdb5] Rendered devise/shared/_links.html.erb (1.1ms)
2019-05-22T13:56:04.509685+00:00 app[web.1]: I, [2019-05-22T13:56:04.509622 #4] INFO -- : [4f5fe5ef-ab45-4012-97be-87de88b8fdb5] Rendered devise/sessions/new.html.erb within layouts/application (1397.3ms)
2019-05-22T13:56:04.511523+00:00 app[web.1]: I, [2019-05-22T13:56:04.511465 #4] INFO -- : [4f5fe5ef-ab45-4012-97be-87de88b8fdb5] Completed 500 Internal Server Error in 1490ms (ActiveRecord: 17.4ms)
2019-05-22T13:56:04.512104+00:00 app[web.1]: F, [2019-05-22T13:56:04.512053 #4] FATAL -- : [4f5fe5ef-ab45-4012-97be-87de88b8fdb5]
2019-05-22T13:56:04.512180+00:00 app[web.1]: F, [2019-05-22T13:56:04.512116 #4] FATAL -- : [4f5fe5ef-ab45-4012-97be-87de88b8fdb5] ActionView::Template::Error (Webpacker can't find application in /app/public/packs/manifest.json. Possible causes:
2019-05-22T13:56:04.512182+00:00 app[web.1]: 1. You want to set webpacker.yml value of compile to true for your environment
2019-05-22T13:56:04.512183+00:00 app[web.1]: unless you are using the `webpack -w` or the webpack-dev-server.
2019-05-22T13:56:04.512184+00:00 app[web.1]: 2. webpack has not yet re-run to reflect updates.
2019-05-22T13:56:04.512185+00:00 app[web.1]: 3. You have misconfigured Webpacker's config/webpacker.yml file.
2019-05-22T13:56:04.512186+00:00 app[web.1]: 4. Your webpack configuration is not creating a manifest.
2019-05-22T13:56:04.512188+00:00 app[web.1]: Your manifest contains:
2019-05-22T13:56:04.512189+00:00 app[web.1]: {
2019-05-22T13:56:04.512190+00:00 app[web.1]: "application.js": "/packs/js/application-b9d827093751ba55443e.js",
2019-05-22T13:56:04.512192+00:00 app[web.1]: "application.js.map": "/packs/js/application-b9d827093751ba55443e.js.map",
2019-05-22T13:56:04.512193+00:00 app[web.1]: "entrypoints": {
2019-05-22T13:56:04.512194+00:00 app[web.1]: "application": {
2019-05-22T13:56:04.512195+00:00 app[web.1]: "js": [
2019-05-22T13:56:04.512196+00:00 app[web.1]: "/packs/js/application-b9d827093751ba55443e.js"
2019-05-22T13:56:04.512197+00:00 app[web.1]: ],
2019-05-22T13:56:04.512198+00:00 app[web.1]: "js.map": [
2019-05-22T13:56:04.512199+00:00 app[web.1]: "/packs/js/application-b9d827093751ba55443e.js.map"
2019-05-22T13:56:04.512200+00:00 app[web.1]: ]
2019-05-22T13:56:04.512201+00:00 app[web.1]: },
2019-05-22T13:56:04.512202+00:00 app[web.1]: "map": {
2019-05-22T13:56:04.512203+00:00 app[web.1]: "css": [
2019-05-22T13:56:04.512204+00:00 app[web.1]: "/packs/css/map-1c42ce8f.css"
2019-05-22T13:56:04.512205+00:00 app[web.1]: ],
2019-05-22T13:56:04.512206+00:00 app[web.1]: "js": [
2019-05-22T13:56:04.512207+00:00 app[web.1]: "/packs/js/map-c76722abf103111664a2.js"
2019-05-22T13:56:04.512208+00:00 app[web.1]: ],
2019-05-22T13:56:04.512209+00:00 app[web.1]: "js.map": [
2019-05-22T13:56:04.512210+00:00 app[web.1]: "/packs/js/map-c76722abf103111664a2.js.map"
2019-05-22T13:56:04.512211+00:00 app[web.1]: ]
2019-05-22T13:56:04.512212+00:00 app[web.1]: }
2019-05-22T13:56:04.512213+00:00 app[web.1]: },
2019-05-22T13:56:04.512214+00:00 app[web.1]: "map.css": "/packs/css/map-1c42ce8f.css",
2019-05-22T13:56:04.512215+00:00 app[web.1]: "map.js": "/packs/js/map-c76722abf103111664a2.js",
2019-05-22T13:56:04.512217+00:00 app[web.1]: "map.js.map": "/packs/js/map-c76722abf103111664a2.js.map"
2019-05-22T13:56:04.512218+00:00 app[web.1]: }
2019-05-22T13:56:04.512219+00:00 app[web.1]: ):
2019-05-22T13:56:04.512299+00:00 app[web.1]: F, [2019-05-22T13:56:04.512257 #4] FATAL -- : [4f5fe5ef-ab45-4012-97be-87de88b8fdb5] 7: <%= csrf_meta_tags %>
2019-05-22T13:56:04.512300+00:00 app[web.1]: [4f5fe5ef-ab45-4012-97be-87de88b8fdb5] 8: <%= action_cable_meta_tag %>
2019-05-22T13:56:04.512301+00:00 app[web.1]: [4f5fe5ef-ab45-4012-97be-87de88b8fdb5] 9: <%= stylesheet_link_tag 'application', media: 'all' %>
2019-05-22T13:56:04.512302+00:00 app[web.1]: [4f5fe5ef-ab45-4012-97be-87de88b8fdb5] 10: <%= stylesheet_pack_tag 'application', media: 'all' %>
2019-05-22T13:56:04.512303+00:00 app[web.1]: [4f5fe5ef-ab45-4012-97be-87de88b8fdb5] 11: <%= stylesheet_pack_tag 'map' %>
2019-05-22T13:56:04.512304+00:00 app[web.1]: [4f5fe5ef-ab45-4012-97be-87de88b8fdb5] 12: </head>
2019-05-22T13:56:04.512305+00:00 app[web.1]: [4f5fe5ef-ab45-4012-97be-87de88b8fdb5] 13: <body>
2019-05-22T13:56:04.512334+00:00 app[web.1]: F, [2019-05-22T13:56:04.512299 #4] FATAL -- : [4f5fe5ef-ab45-4012-97be-87de88b8fdb5]
2019-05-22T13:56:04.512374+00:00 app[web.1]: F, [2019-05-22T13:56:04.512340 #4] FATAL -- : [4f5fe5ef-ab45-4012-97be-87de88b8fdb5] app/views/layouts/application.html.erb:10:in `_app_views_layouts_application_html_erb__246445882644024882_47273754121400'```
My routes
Rails.application.routes.draw do
devise_for :users
get '/dashboard' => 'pages#dashboard'
devise_scope :user do
root to: "devise/sessions#new"
end
authenticated :user do
root 'pages#dashboard'
end
end
My Layouts
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Concierge#Sea</title>
<%= csrf_meta_tags %>
<%= action_cable_meta_tag %>
<%= stylesheet_link_tag 'application', media: 'all' %>
<%= stylesheet_pack_tag 'application', media: 'all' %>
<%= stylesheet_pack_tag 'map' %>
</head>
<body>
<%= render 'shared/flyout' %>
<%= render 'shared/navbar' %>
<%= render 'shared/flashes' %>
<%= yield %>
<%= javascript_include_tag 'application' %>
<%= javascript_pack_tag 'application' %>
<%= javascript_pack_tag 'map' %>
</body>
</html>
Thanks you if you can help me or give me any advice
From your heroku logs looks like you have issues with webpacker. As you can see here
2019-05-22T13:56:04.512104+00:00 app[web.1]: F, [2019-05-22T13:56:04.512053 #4] FATAL -- : [4f5fe5ef-ab45-4012-97be-87de88b8fdb5]
2019-05-22T13:56:04.512180+00:00 app[web.1]: F, [2019-05-22T13:56:04.512116 #4] FATAL -- : [4f5fe5ef-ab45-4012-97be-87de88b8fdb5] ActionView::Template::Error (Webpacker can't find application in /app/public/packs/manifest.json. Possible causes:
2019-05-22T13:56:04.512182+00:00 app[web.1]: 1. You want to set webpacker.yml value of compile to true for your environment
2019-05-22T13:56:04.512183+00:00 app[web.1]: unless you are using the `webpack -w` or the webpack-dev-server.
2019-05-22T13:56:04.512184+00:00 app[web.1]: 2. webpack has not yet re-run to reflect updates.
2019-05-22T13:56:04.512185+00:00 app[web.1]: 3. You have misconfigured Webpacker's config/webpacker.yml file.
2019-05-22T13:56:04.512186+00:00 app[web.1]: 4. Your webpack configuration is not creating a manifest.
Did you run webpacker:compile command on heroku?
Also based on info here https://github.com/rails/webpacker/issues/1494. There may be an issue with webpacker itself.

error 'Don't know how to build task 'konacha:serve'

I have followed steps in https://www.botreetechnologies.com/blog/test-rails-app-using-mocha-js-chai-js to setup konacha.
I wrote a simple hello world test as follows in spec/javascripts folder:
var assert = require('assert');
describe('HelloWorld Module', function() {
it('should return -1 when "Hello" is missing', function() {
assert.equal(-1, "Hallo World".indexOf("Hello"));
});
it('should return 0 when sentence starts with Hello', function() {
assert.equal(0, "Hello World, how are you?".indexOf("Hello"));
});
});
when I run $bundle exec rake konacha:run --trace, it gives the following error:
rake aborted!
Don't know how to build task 'konacha:run' (see --tasks)
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/task_manager.rb:71:in `[]'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/application.rb:151:in `invoke_task'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/application.rb:108:in `block (2 levels) in top_level'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/application.rb:108:in `each'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/application.rb:108:in `block in top_level'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/application.rb:117:in `run_with_threads'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/application.rb:102:in `top_level'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/application.rb:80:in `block in run'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/application.rb:178:in `standard_exception_handling'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/rake-11.3.0/lib/rake/application.rb:77:in `run'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/rake-11.3.0/exe/rake:27:in `<top (required)>'
/home/vagrant/.rbenv/versions/2.2.10/bin/rake:23:in `load'
/home/vagrant/.rbenv/versions/2.2.10/bin/rake:23:in `<top (required)>'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/bundler-1.17.1/lib/bundler/cli/exec.rb:74:in `load'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/bundler-1.17.1/lib/bundler/cli/exec.rb:74:in `kernel_load'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/bundler-1.17.1/lib/bundler/cli/exec.rb:28:in `run'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/bundler-1.17.1/lib/bundler/cli.rb:463:in `exec'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/bundler-1.17.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/bundler-1.17.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/bundler-1.17.1/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/bundler-1.17.1/lib/bundler/cli.rb:27:in `dispatch'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/bundler-1.17.1/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/bundler-1.17.1/lib/bundler/cli.rb:18:in `start'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/bundler-1.17.1/exe/bundle:30:in `block in <top (required)>'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/bundler-1.17.1/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
/home/vagrant/.rbenv/versions/2.2.10/lib/ruby/gems/2.2.0/gems/bundler-1.17.1/exe/bundle:22:in `<top (required)>'
/home/vagrant/.rbenv/versions/2.2.10/bin/bundle:23:in `load'
/home/vagrant/.rbenv/versions/2.2.10/bin/bundle:23:in `<main>'
Could someone please help me with this.
I had to include the gem not just in the :test group of the gemfile but also in the :development group. It seemed to work after that.

Basecamp's Trix WYSIWYG editor gem not saving file attachment in Rails 4 app

I added the Trix editor gem to my Rails 4 app and followed the instructions on that page exactly. The text is displaying correctly after I save a post (bold/italic/strikethrough/paragraph spacing all good), BUT any images that I drag into the text editor disappear when I save the post. What am I doing wrong?
Thanks.
app/assets/stylesheets/application.scss:
/*
*= require_self
*= require trix
*/
#import "bootstrap";
#import "bootstrap-sprockets";
#import "font-awesome";
#import url(https://fonts.googleapis.com/css?family=Delius+Swash+Caps);
#import url(https://fonts.googleapis.com/css?family=Reenie+Beanie);
#import url(https://fonts.googleapis.com/css?family=Special+Elite);
#import url(https://fonts.googleapis.com/css?family=Londrina+Shadow);
app/assets/javascripts/application.js:
//= require jquery
//= require jquery_ujs
//= require bootstrap-sprockets
//= require bootstrap
//= require trix
//= require_tree .
_form.html.erb:
<%= form_for #article, html: {multipart: true} do |f| %>
<p>
<%= f.label :image %>
<%= f.file_field :image %>
</p>
<p>
<%= f.label :title %>
<%= f.text_field :title %>
</p>
<p>
<%= f.label :subtitle %>
<%= f.text_field :subtitle %>
</p>
<%= f.label :text %>
<%= f.trix_editor :text, class: 'trix-content' %>
<p>
<%= f.label :tags %>
<%= f.text_field :tag_list %>
</p>
<p>
<%= f.submit %>
</p>
<% end %>
new.html.erb
<div class="container">
<div class="jumbotron">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<h1>New article</h1>
<%= render 'form' %>
<%= link_to 'Back', articles_path %>
</div>
</div>
</div>
</div>
Gemfile:
gem 'rails', '4.2.2'
gem 'pg'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'
gem 'bootstrap-sass', '~> 3.3', '>= 3.3.6'
gem 'devise', '~> 3.5', '>= 3.5.6'
gem "font-awesome-rails"
gem 'paperclip', '~> 4.2'
gem 'aws-sdk', '~> 1.66'
gem 'figaro', '~> 1.1', '>= 1.1.1'
gem 'simple_form'
gem 'mail_form'
gem 'acts-as-taggable-on', '~> 3.4'
gem 'fog'
gem 'rmagick', '~> 2.15', '>= 2.15.4'
gem 'carrierwave'
gem "fog-aws"
gem 'trix', '~> 0.9.0'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
In this example, I've created a Image model and controller that has a GET and POST method to them. I used refile to handle the file uploads, but it would work similar with carrierwave. The idea is to listen on the event trix-attachment-add and send an XHR POST to your ImagesController. From here, you can send a JSON response back to your XHR Request and call JSON.parse to capture the response text. Trix expects a valid URL to be returned and the attributes set on the attachment. Until this is properly done, it will be in a pending state and not actually save the image and/or caption.
# ImagesController
def create
#image = Image.new(image_params)
#image.save
respond_to do |format|
format.json { render :json => { url: Refile.attachment_url(#image, :image)} }
end
end
# Some Javascript
(function() {
var host, uploadAttachment;
document.addEventListener("trix-attachment-add", function(event) {
var attachment;
attachment = event.attachment;
if (attachment.file) {
return uploadAttachment(attachment);
}
});
host = "/images";
uploadAttachment = function(attachment) {
var file, form, xhr;
file = attachment.file;
form = new FormData;
form.append("Content-Type", file.type);
form.append("image[image]", file);
xhr = new XMLHttpRequest;
xhr.open("POST", host, true);
xhr.upload.onprogress = function(event) {
var progress;
progress = event.loaded / event.total * 100;
return attachment.setUploadProgress(progress);
};
xhr.onload = function() {
var href, url;
url = href = JSON.parse(this.responseText).url;
return attachment.setAttributes({
url: url,
href: href
});
};
return xhr.send(form);
};
}).call(this);
As an alternative to #kobaltz response, you can use fetch like this:
uploadAttachment = function(attachment) {
var file, form, key, xhr;
file = attachment.file;
form = new FormData;
form.append("Content-Type", file.type);
form.append("image[picture]", file);
fetch(host, {
method: "POST",
body: form,
headers: {
'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content'),
'X-Requested-With': 'XMLHttpRequest'
},
credentials: 'same-origin'
})
.then(function(response) {
if (response.ok) {
return response.json();
}
})
.then(function(json) {
var href, url;
url = href = json.url;
return attachment.setAttributes({
url: url,
href: href
});
})
};

Rails 4 and ckeditor

My app uses Rails 4, and I'm using the ckeditor gem and turbolinks.
In my form partial I call the ckeditor as so:
.form-group
= f.label :content, "Содержание", class: "col-sm-3 control-label"
.col-sm-8
= f.text_area :content, class: "form-control ckeditor", rows: 50
When I go to this page, I don't see ckeditor. Only after I update page does it appear. But why? What am I doing wrong? I think it's because of turbolinks. How do I solve this?
Using this gem: ckeditor
Gemfile for the last version
gem "ckeditor", :git => "https://github.com/galetahub/ckeditor.git"
Application.js
//= require ckeditor/init
In the views as the readme said:
<%= form_for #page do |form| -%>
...
<%= form.cktext_area :notes, :class => 'someclass', :ckeditor => {:language => 'uk'} %>
...
<%= form.cktext_area :content, :value => 'Default value', :id => 'sometext' %>
...
<%= cktext_area :page, :info, :cols => 40, :ckeditor => {:uiColor => '#AADC6E', :toolbar => 'mini'} %>
...
<% end -%>
Use cktext_area instead of text_area
for the rails 4 assets you need
//= require ckeditor/override
//= require ckeditor/init
And there's a trick for the compilation of assets, you need to look into the readme.
Hope it helps!

Categories