B
B
Bogdan2017-06-22 00:08:44
Ruby on Rails
Bogdan, 2017-06-22 00:08:44

Rails + foreman?

Hello. Do not prompt in what there can be a problem. I start the server through the foreman file

web: rails log:clear assets:clobber assets:precompile tmp:clear && rails server puma

Well, actually everything worked, after updating the project files, it already stopped working, but it also gives an error. But what is most interesting is that if you simply run the command "rails log:clear assets:clobber assets:precompile tmp:clear && rails server puma" in the console, then there are no errors and everything works out. Do not tell me where to dig to determine what the actual problem is? Thank you.
$ CD C:\portal_production   && foreman start --env .env.production --procfile Procfile.production
23:46:15 web.1  | started with pid 105596
23:46:18 web.1  | ** Invoke log:clear (first_time)
23:46:18 web.1  | ** Execute log:clear
23:46:18 web.1  | ** Invoke assets:clobber (first_time)
23:46:18 web.1  | ** Invoke assets:environment (first_time)
23:46:18 web.1  | ** Execute assets:environment
23:46:18 web.1  | ** Invoke environment (first_time)
23:46:18 web.1  | ** Execute environment
23:46:18 web.1  | ** Execute assets:clobber
23:46:18 web.1  | I, [2017-06-21T23:46:18.796839 #73588]  INFO -- : Removed C:/portal_production/public/assets
23:46:18 web.1  | ** Invoke assets:precompile (first_time)
23:46:18 web.1  | ** Invoke assets:environment
23:46:18 web.1  | ** Invoke yarn:install (first_time)
23:46:18 web.1  | ** Execute yarn:install
23:46:18 web.1  | ** Execute assets:precompile
.............................................
23:46:20 web.1  | rails aborted!
23:46:20 web.1  | ExecJS::RuntimeError: SyntaxError: Unexpected token: name (myLibs)
23:46:20 web.1  | JS_Parse_Error.get (C:\Users\BC2D0~1.HAY\AppData\Local\Temp\execjs20170621-73588-6shsazjs:3538:621)
23:46:20 web.1  | C:\Users\BC2D0~1.HAY\AppData\Local\Temp\execjs20170621-73588-6shsazjs:4060:47
23:46:20 web.1  | C:\Users\BC2D0~1.HAY\AppData\Local\Temp\execjs20170621-73588-6shsazjs:1:102
23:46:20 web.1  | Object.<anonymous> (C:\Users\BC2D0~1.HAY\AppData\Local\Temp\execjs20170621-73588-6shsazjs:1:120)
23:46:20 web.1  | Module._compile (module.js:571:32)
23:46:20 web.1  | Object.Module._extensions..js (module.js:580:10)
23:46:20 web.1  | Module.load (module.js:488:32)
23:46:20 web.1  | tryModuleLoad (module.js:447:12)
23:46:20 web.1  | Function.Module._load (module.js:439:3)
23:46:20 web.1  | Module.runMain (module.js:605:10)
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:39:in `exec'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:21:in `eval'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/execjs-2.7.0/lib/execjs/external_runtime.rb:46:in `call'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/uglifier-3.2.0/lib/uglifier.rb:195:in `run_uglifyjs'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/uglifier-3.2.0/lib/uglifier.rb:157:in `compile'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/uglifier_compressor.rb:53:in `call'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/uglifier_compressor.rb:28:in `call'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:75:in `call_processor'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in `reverse_each'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in `call_processors'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:134:in `load_from_unloaded'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:60:in `block in load'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:44:in `load'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:20:in `block in initialize'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:47:in `load'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/base.rb:66:in `find_asset'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/base.rb:73:in `find_all_linked_assets'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:142:in `block in find'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:228:in `block in stat_tree'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:212:in `block in stat_directory'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:209:in `each'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:209:in `stat_directory'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:227:in `stat_tree'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:105:in `each'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:105:in `block in logical_paths'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:104:in `each'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:104:in `logical_paths'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:140:in `find'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:185:in `compile'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sprockets-rails-3.2.0/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sprockets-3.7.1/lib/rake/sprocketstask.rb:147:in `with_logger'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/sprockets-rails-3.2.0/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `block in execute'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `each'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `execute'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:194:in `block in invoke_with_call_chain'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:187:in `invoke_with_call_chain'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:180:in `invoke'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:152:in `invoke_task'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `block (2 levels) in top_level'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `each'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `block in top_level'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:117:in `run_with_threads'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:102:in `top_level'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.1.1/lib/rails/commands/rake/rake_command.rb:21:in `block in perform'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.1.1/lib/rails/commands/rake/rake_command.rb:18:in `perform'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.1.1/lib/rails/command.rb:46:in `invoke'
23:46:20 web.1  | C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.1.1/lib/rails/commands.rb:16:in `<top (required)>'
23:46:20 web.1  | bin/rails:4:in `require'
23:46:20 web.1  | bin/rails:4:in `<main>'
23:46:20 web.1  | Tasks: TOP => assets:precompile
23:46:20 web.1  | exited with code 1
23:46:20 system | sending SIGKILL to all processes

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Mirilaczvili, 2017-07-01
@2ord

There is an error in the log when compiling, assets:precompile. She must be found.
Try to run the same commands one by one separately, it's better to put them in a separate bat,
launching at the end of the commands directly the web server itself in Foreman.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question