找不到 JavaScript 运行时。有关可用运行时的列表,请参阅 https://github.com/rails/execjs。 (ExecJS::RuntimeUnavailable)
Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
我在此服务器上还有其他 rails 应用程序运行正常...
我的服务器 nodejs
安装了
我在 gemfile 中有 gem 'therubyracer', platforms: :ruby
,
我试试 bundle install
,
我在 prod conf
中尝试 config.assets.js_compressor = Uglifier.new(harmony: true)
但没有解决错误...
[passenger_native_support.so] trying to compile for the current user (www-data) and Ruby interpreter...
(set PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0 to disable)
Warning: compilation didn't succeed. To learn why, read this file:
/var/www/ddemarque/passenger_native_support-hxohsj.log
[passenger_native_support.so] finding downloads for the current Ruby interpreter...
(set PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY=0 to disable)
Could not download https://github.com/phusion/passenger/releases/download/release-6.0.8/rubyext-ruby-2.5.1-x86_64-linux.tar.gz: no download tool found (curl or wget required)
Trying next mirror...
Could not download https://oss-binaries.phusionpassenger.com/binaries/passenger/by_release/6.0.8/rubyext-ruby-2.5.1-x86_64-linux.tar.gz: no download tool found (curl or wget required)
Trying next mirror...
Could not download https://s3.amazonaws.com/phusion-passenger/binaries/passenger/by_release/6.0.8/rubyext-ruby-2.5.1-x86_64-linux.tar.gz: no download tool found (curl or wget required)
[passenger_native_support.so] will not be used (can't compile or download)
--> Passenger will still operate normally.
Error: The application encountered the following error: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/execjs-2.8.1/lib/execjs/runtimes.rb:58:in `autodetect'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/execjs-2.8.1/lib/execjs.rb:5:in `<module:ExecJS>'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/execjs-2.8.1/lib/execjs.rb:4:in `<top (required)>'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/uglifier-3.2.0/lib/uglifier.rb:5:in `<top (required)>'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.2.15/lib/bundler/runtime.rb:66:in `block (2 levels) in require'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.2.15/lib/bundler/runtime.rb:61:in `each'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.2.15/lib/bundler/runtime.rb:61:in `block in require'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.2.15/lib/bundler/runtime.rb:50:in `each'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.2.15/lib/bundler/runtime.rb:50:in `require'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.2.15/lib/bundler.rb:173:in `require'
/var/www/ddemarque/config/application.rb:7:in `<top (required)>'
/var/www/ddemarque/config/environment.rb:2:in `require_relative'
/var/www/ddemarque/config/environment.rb:2:in `<top (required)>'
config.ru:3:in `require_relative'
config.ru:3:in `block in <main>'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rack-2.2.3/lib/rack/builder.rb:125:in `instance_eval'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rack-2.2.3/lib/rack/builder.rb:125:in `initialize'
config.ru:1:in `new'
config.ru:1:in `<main>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:101:in `eval'
/usr/share/passenger/helper-scripts/rack-preloader.rb:101:in `preload_app'
/usr/share/passenger/helper-scripts/rack-preloader.rb:189:in `block in <module:App>'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:390:in `run_block_and_record_step_progress'
/usr/share/passenger/helper-scripts/rack-preloader.rb:188:in `<module:App>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<main>'
我强制 gem execjs 从 2.8.1 开始降到 2.7.0,它的工作...
我在此服务器上还有其他 rails 应用程序运行正常...
我的服务器 nodejs
安装了
我在 gemfile 中有 gem 'therubyracer', platforms: :ruby
,
我试试 bundle install
,
我在 prod conf
config.assets.js_compressor = Uglifier.new(harmony: true)
但没有解决错误...
[passenger_native_support.so] trying to compile for the current user (www-data) and Ruby interpreter...
(set PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0 to disable)
Warning: compilation didn't succeed. To learn why, read this file:
/var/www/ddemarque/passenger_native_support-hxohsj.log
[passenger_native_support.so] finding downloads for the current Ruby interpreter...
(set PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY=0 to disable)
Could not download https://github.com/phusion/passenger/releases/download/release-6.0.8/rubyext-ruby-2.5.1-x86_64-linux.tar.gz: no download tool found (curl or wget required)
Trying next mirror...
Could not download https://oss-binaries.phusionpassenger.com/binaries/passenger/by_release/6.0.8/rubyext-ruby-2.5.1-x86_64-linux.tar.gz: no download tool found (curl or wget required)
Trying next mirror...
Could not download https://s3.amazonaws.com/phusion-passenger/binaries/passenger/by_release/6.0.8/rubyext-ruby-2.5.1-x86_64-linux.tar.gz: no download tool found (curl or wget required)
[passenger_native_support.so] will not be used (can't compile or download)
--> Passenger will still operate normally.
Error: The application encountered the following error: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/execjs-2.8.1/lib/execjs/runtimes.rb:58:in `autodetect'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/execjs-2.8.1/lib/execjs.rb:5:in `<module:ExecJS>'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/execjs-2.8.1/lib/execjs.rb:4:in `<top (required)>'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/uglifier-3.2.0/lib/uglifier.rb:5:in `<top (required)>'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.2.15/lib/bundler/runtime.rb:66:in `block (2 levels) in require'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.2.15/lib/bundler/runtime.rb:61:in `each'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.2.15/lib/bundler/runtime.rb:61:in `block in require'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.2.15/lib/bundler/runtime.rb:50:in `each'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.2.15/lib/bundler/runtime.rb:50:in `require'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.2.15/lib/bundler.rb:173:in `require'
/var/www/ddemarque/config/application.rb:7:in `<top (required)>'
/var/www/ddemarque/config/environment.rb:2:in `require_relative'
/var/www/ddemarque/config/environment.rb:2:in `<top (required)>'
config.ru:3:in `require_relative'
config.ru:3:in `block in <main>'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rack-2.2.3/lib/rack/builder.rb:125:in `instance_eval'
/home/USER/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rack-2.2.3/lib/rack/builder.rb:125:in `initialize'
config.ru:1:in `new'
config.ru:1:in `<main>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:101:in `eval'
/usr/share/passenger/helper-scripts/rack-preloader.rb:101:in `preload_app'
/usr/share/passenger/helper-scripts/rack-preloader.rb:189:in `block in <module:App>'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:390:in `run_block_and_record_step_progress'
/usr/share/passenger/helper-scripts/rack-preloader.rb:188:in `<module:App>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<main>'
我强制 gem execjs 从 2.8.1 开始降到 2.7.0,它的工作...