Plesk x Rails x Passenger: ошибка загрузки самоцвета uglifier (время выполнения JavaScript)

Я купил план веб-хостинга в Plesk для приложения Rails, и у меня возникла проблема с запуском приложения. Служба поддержки заявила, что она поставляется с Пассажиром по умолчанию. Поскольку детали ошибок невидимы в производственной среде, я перешел в режим разработки и получил это.

Error:
Web application could not be started
Error ID:
87b297a4
Details:
There was an error while trying to load the gem 'uglifier'.
Gem Load Error is: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes.
Backtrace for gem load error is:
/var/www/vhosts/ttravel.com/httpdocs/vendor/bundle/ruby/2.3.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:58:in `autodetect'
/var/www/vhosts/ttravel.com/httpdocs/vendor/bundle/ruby/2.3.0/gems/execjs-2.7.0/lib/execjs.rb:5:in `<module:ExecJS>'
/var/www/vhosts/ttravel.com/httpdocs/vendor/bundle/ruby/2.3.0/gems/execjs-2.7.0/lib/execjs.rb:4:in `<top (required)>'
/var/www/vhosts/ttravel.com/httpdocs/vendor/bundle/ruby/2.3.0/gems/uglifier-4.1.5/lib/uglifier.rb:5:in `require'
/var/www/vhosts/ttravel.com/httpdocs/vendor/bundle/ruby/2.3.0/gems/uglifier-4.1.5/lib/uglifier.rb:5:in `<top (required)>'
/opt/plesk/ruby/2.3.6/lib/x86_64-linux-gnu/ruby/gems/2.3.0/gems/bundler-1.13.5/lib/bundler/runtime.rb:91:in `require'
/opt/plesk/ruby/2.3.6/lib/x86_64-linux-gnu/ruby/gems/2.3.0/gems/bundler-1.13.5/lib/bundler/runtime.rb:91:in `block (2 levels) in require'
/opt/plesk/ruby/2.3.6/lib/x86_64-linux-gnu/ruby/gems/2.3.0/gems/bundler-1.13.5/lib/bundler/runtime.rb:86:in `each'
/opt/plesk/ruby/2.3.6/lib/x86_64-linux-gnu/ruby/gems/2.3.0/gems/bundler-1.13.5/lib/bundler/runtime.rb:86:in `block in require'
/opt/plesk/ruby/2.3.6/lib/x86_64-linux-gnu/ruby/gems/2.3.0/gems/bundler-1.13.5/lib/bundler/runtime.rb:75:in `each'
/opt/plesk/ruby/2.3.6/lib/x86_64-linux-gnu/ruby/gems/2.3.0/gems/bundler-1.13.5/lib/bundler/runtime.rb:75:in `require'
/opt/plesk/ruby/2.3.6/lib/x86_64-linux-gnu/ruby/gems/2.3.0/gems/bundler-1.13.5/lib/bundler.rb:106:in `require'
/var/www/vhosts/ttravel.com/httpdocs/config/application.rb:7:in `<top (required)>'
/var/www/vhosts/ttravel.com/httpdocs/config/environment.rb:2:in `require'
/var/www/vhosts/ttravel.com/httpdocs/config/environment.rb:2:in `<top (required)>'
config.ru:3:in `require'
config.ru:3:in `block in <main>'
/var/www/vhosts/ttravel.com/httpdocs/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/builder.rb:55:in `instance_eval'
/var/www/vhosts/ttravel.com/httpdocs/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/builder.rb:55:in `initialize'
config.ru:1:in `new'
config.ru:1:in `<main>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:110:in `eval'
/usr/share/passenger/helper-scripts/rack-preloader.rb:110:in `preload_app'
/usr/share/passenger/helper-scripts/rack-preloader.rb:156: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>'
Bundler Error Backtrace:
 (Bundler::GemRequireError)
  /opt/plesk/ruby/2.3.6/lib/x86_64-linux-gnu/ruby/gems/2.3.0/gems/bundler-1.13.5/lib/bundler/runtime.rb:94:in `rescue in block (2 levels) in require'
  /opt/plesk/ruby/2.3.6/lib/x86_64-linux-gnu/ruby/gems/2.3.0/gems/bundler-1.13.5/lib/bundler/runtime.rb:90:in `block (2 levels) in require'
  /opt/plesk/ruby/2.3.6/lib/x86_64-linux-gnu/ruby/gems/2.3.0/gems/bundler-1.13.5/lib/bundler/runtime.rb:86:in `each'
  /opt/plesk/ruby/2.3.6/lib/x86_64-linux-gnu/ruby/gems/2.3.0/gems/bundler-1.13.5/lib/bundler/runtime.rb:86:in `block in require'
  /opt/plesk/ruby/2.3.6/lib/x86_64-linux-gnu/ruby/gems/2.3.0/gems/bundler-1.13.5/lib/bundler/runtime.rb:75:in `each'
  /opt/plesk/ruby/2.3.6/lib/x86_64-linux-gnu/ruby/gems/2.3.0/gems/bundler-1.13.5/lib/bundler/runtime.rb:75:in `require'
  /opt/plesk/ruby/2.3.6/lib/x86_64-linux-gnu/ruby/gems/2.3.0/gems/bundler-1.13.5/lib/bundler.rb:106:in `require'
  /var/www/vhosts/ttravel.com/httpdocs/config/application.rb:7:in `<top (required)>'
  /var/www/vhosts/ttravel.com/httpdocs/config/environment.rb:2:in `require'
  /var/www/vhosts/ttravel.com/httpdocs/config/environment.rb:2:in `<top (required)>'
  config.ru:3:in `require'
  config.ru:3:in `block in <main>'
  /var/www/vhosts/ttravel.com/httpdocs/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/builder.rb:55:in `instance_eval'
  /var/www/vhosts/ttravel.com/httpdocs/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/builder.rb:55:in `initialize'
  config.ru:1:in `new'
  config.ru:1:in `<main>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:110:in `eval'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:110:in `preload_app'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:156: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>'

Gemfile является

source 'https://rubygems.org'


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.6'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/rails/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', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

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

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

gem 'jquery-turbolinks'
gem 'figaro'
gem 'sqlite3'
gem 'passenger'

group :production do
  gem 'pg'
  gem 'rails_12factor'
end

group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug'
  gem 'pry-rails'
end

group :development do
  # Access an IRB console on exception pages or by using <%= console %> in views
  gem 'web-console', '~> 2.0'

  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
  gem 'spring'
end

Кто-нибудь знает, как это исправить? Заранее спасибо за помощь.

0 ответов

Другие вопросы по тегам