Я пытаюсь развернуть Ruby on Rails с помощью nginx и passenger. Но я получаю следующую ошибку в /var/log/nginx/error.log
[ E 2018-09-19 12:07:12.5312 24363/Tb age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /home/example/test_app: The application encountered the following error: There was an error while trying to load the gem 'coffee-rails'.
Gem Load Error is: HOME environment variable (or HOMEDRIVE and HOMEPATH) must be set and point to a directory
Backtrace for gem load error is:
/var/lib/gems/2.3.0/gems/rb-readline-0.5.5/lib/rbreadline.rb:1097:in `<module:RbReadline>'
/var/lib/gems/2.3.0/gems/rb-readline-0.5.5/lib/rbreadline.rb:17:in `<top (required)>'
/var/lib/gems/2.3.0/gems/rb-readline-0.5.5/lib/readline.rb:10:in `require'
/var/lib/gems/2.3.0/gems/rb-readline-0.5.5/lib/readline.rb:10:in `<module:Readline>'
/var/lib/gems/2.3.0/gems/rb-readline-0.5.5/lib/readline.rb:8:in `<top (required)>'
/var/lib/gems/2.3.0/gems/thor-0.20.0/lib/thor/line_editor/readline.rb:2:in `require'
/var/lib/gems/2.3.0/gems/thor-0.20.0/lib/thor/line_editor/readline.rb:2:in `<top (required)>'
/var/lib/gems/2.3.0/gems/thor-0.20.0/lib/thor/line_editor.rb:2:in `require'
/var/lib/gems/2.3.0/gems/thor-0.20.0/lib/thor/line_editor.rb:2:in `<top (required)>'
/var/lib/gems/2.3.0/gems/thor-0.20.0/lib/thor/base.rb:8:in `require'
/var/lib/gems/2.3.0/gems/thor-0.20.0/lib/thor/base.rb:8:in `<top (required)>'
/var/lib/gems/2.3.0/gems/thor-0.20.0/lib/thor/group.rb:1:in `require'
/var/lib/gems/2.3.0/gems/thor-0.20.0/lib/thor/group.rb:1:in `<top (required)>'
/var/lib/gems/2.3.0/gems/railties-5.1.4/lib/rails/generators.rb:4:in `require'
/var/lib/gems/2.3.0/gems/railties-5.1.4/lib/rails/generators.rb:4:in `<top (required)>'
/var/lib/gems/2.3.0/gems/coffee-rails-4.2.2/lib/coffee/rails/engine.rb:2:in `require'
/var/lib/gems/2.3.0/gems/coffee-rails-4.2.2/lib/coffee/rails/engine.rb:2:in `<top (required)>'
/var/lib/gems/2.3.0/gems/coffee-rails-4.2.2/lib/coffee-rails.rb:2:in `require'
/var/lib/gems/2.3.0/gems/coffee-rails-4.2.2/lib/coffee-rails.rb:2:in `<top (required)>'
/var/lib/gems/2.3.0/gems/bundler-1.16.4/lib/bundler/runtime.rb:81:in `require'
/var/lib/gems/2.3.0/gems/bundler-1.16.4/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
/var/lib/gems/2.3.0/gems/bundler-1.16.4/lib/bundler/runtime.rb:76:in `each'
/var/lib/gems/2.3.0/gems/bundler-1.16.4/lib/bundler/runtime.rb:76:in `block in require'
/var/lib/gems/2.3.0/gems/bundler-1.16.4/lib/bundler/runtime.rb:65:in `each'
/var/lib/gems/2.3.0/gems/bundler-1.16.4/lib/bundler/runtime.rb:65:in `require'
/var/lib/gems/2.3.0/gems/bundler-1.16.4/lib/bundler.rb:114:in `require'
/home/example/test_app/config/application.rb:7:in `<top (required)>'
/home/example/test_app/config/environment.rb:2:in `require_relative'
/home/example/test_app/config/environment.rb:2:in `<top (required)>'
config.ru:3:in `require_relative'
config.ru:3:in `block in <main>'
/var/lib/gems/2.3.0/gems/rack-2.0.5/lib/rack/builder.rb:55:in `instance_eval'
/var/lib/gems/2.3.0/gems/rack-2.0.5/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: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:380: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>'
Bundler Error Backtrace:
(Bundler::GemRequireError)
Error ID: e59091b1
Error details saved to: /tmp/passenger-error-gd9d3n.html
[ E 2018-09-19 12:07:12.5374 24363/T7 age/Cor/Con/CheckoutSession.cpp:276 ]: [Client 1-1] Cannot checkout session because a spawning error occurred. The identifier of the error is e59091b1. Please see earlier logs for details about the error.
моего гемфайла:
source 'https://rubygems.org'
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end
gem 'rails', '5.1.4'
gem 'bcrypt', '3.1.11'
gem 'faker', '1.7.3'
gem 'carrierwave', '1.1.0'
gem 'mini_magick', '4.7.0'
gem 'fog-aws', '2.0.0'
gem 'nokogiri', '1.8.1'
gem 'will_paginate', '3.1.6'
gem 'bootstrap-will_paginate', '1.0.0'
gem 'bootstrap-sass', '~> 3.3.7'
gem 'puma', '3.9.1'
gem 'sass-rails', '5.0.6'
gem 'uglifier', '3.2.0'
gem 'coffee-rails'
gem 'jquery-rails', '4.3.1'
gem 'turbolinks', '5.0.1'
gem 'jbuilder', '2.7.0'
gem 'therubyracer', platforms: :ruby
gem 'activeadmin'
gem 'devise'
gem 'trix'
gem 'shrine'
gem 'mina'
gem 'sqlite3', '1.3.13'
gem 'rb-readline'
group :development, :test do
gem 'byebug', '9.0.6', platform: :mri
gem 'pry'
end
group :development do
gem 'web-console', '3.5.1'
gem 'listen', '3.0.8'
gem 'spring', '2.0.2'
gem 'spring-watcher-listen', '2.0.1'
end
group :test do
gem 'rails-controller-testing', '1.0.2'
gem 'minitest', '5.10.3'
gem 'minitest-reporters', '1.1.14'
gem 'guard', '2.13.0'
gem 'guard-minitest', '2.4.4'
end
group :production do
# gem 'pg', '0.20.0'
gem 'fog', '1.42'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
Вся информация о "HOME enviromment", которую я получил, находится на Windows, но я на Ubuntu 16.04.Так что я понятия не имею об ошибке.Ну, я впервые задаю вопросы в stackoverflow.Может быть, это не совсем понятно.