私のGemfileを表示させてください。AWSでプロジェクトを展開するときに問題が発生する
source 'https://rubygems.org'
ruby "2.4.1"
gem 'rails', '5.1.4'
gem 'puma'
gem 'pg'
gem "bower-rails", "~> 0.11.0"
gem 'd3_rails'
# Auth
gem 'devise'
gem 'omniauth-facebook'
gem 'omniauth-twitter'
gem 'omniauth-google-oauth2'
# Front-end
gem 'react-rails'
gem 'bootstrap-sass'
gem 'sass-rails'
gem 'font-awesome-sass'
gem 'uglifier'
gem 'autoprefixer-rails'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
gem 'turbolinks'
gem 'jquery-rails'
gem 'jquery-ui-rails'
gem 'jbuilder'
gem 'friendly_id'
# Image upload
gem 'carrierwave'
gem 'mini_magick'
gem 'fog'
gem 'net-ssh'
gem 'sdoc', group: :doc
# Load will_paginate before elasticsearch gems.
gem 'will_paginate'
# Elasticsearch
gem 'elasticsearch-model'
gem 'elasticsearch-rails'
# Background Job
gem 'sidekiq'
gem 'sinatra', require: false
gem 'slim'
# gem 'sidetiq', '~> 0.7.0'
gem 'nokogiri'
# Caching
gem 'dalli'
gem 'bundler-audit'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
group :development, :test do
gem 'byebug'
gem 'rspec-rails', '~> 3.6'
gem 'poltergeist'
gem 'awesome_print'
gem 'pry-rails'
end
group :development do
gem 'rails_best_practices'
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console'
gem 'spring'
gem 'guard-rspec', require: false
gem 'spring-commands-rspec'
gem 'rack-mini-profiler', require: false
gem 'annotate'
gem 'bullet'
end
group :test do
gem 'database_cleaner'
gem 'capybara'
gem 'factory_girl_rails'
gem 'faker'
gem 'launchy'
gem 'selenium-webdriver'
end
group :production do
gem 'rails_12factor'
gem 'bonsai-elasticsearch-rails'
end
宝石をインストールし、PassengerとApache2 Serverについて完全に設定してもエラーはありません。それは、私のレールアプリをデプロイするときにエラーが発生しないことを意味します。
そして私はapacheのerror.logに
N 2017-09-21 12:26:00.3272 883/T5 Ser/Server.h:531 ]: [UstRouterApiServer] Shutdown finished
[ N 2017-09-21 12:26:00.3274 883/T3 Ser/Server.h:531 ]: [UstRouter] Shutdown finished
[ N 2017-09-21 12:26:00.3275 883/T1 age/Ust/UstRouterMain.cpp:531 ]: Passenger UstRouter shutdown finished
[ N 2017-09-21 12:26:00.3352 2202/T1 age/Wat/WatchdogMain.cpp:1283 ]: Starting Passenger watchdog...
[ N 2017-09-21 12:26:00.3496 2206/T1 age/Cor/CoreMain.cpp:1083 ]: Starting Passenger core...
[ N 2017-09-21 12:26:00.3497 2206/T1 age/Cor/CoreMain.cpp:248 ]: Passenger core running in multi-application mode.
[ N 2017-09-21 12:26:00.3574 2206/T1 age/Cor/CoreMain.cpp:830 ]: Passenger core online, PID 2206
[ N 2017-09-21 12:26:00.3742 2212/T1 age/Ust/UstRouterMain.cpp:537 ]: Starting Passenger UstRouter...
[ N 2017-09-21 12:26:00.3750 2212/T1 age/Ust/UstRouterMain.cpp:350 ]: Passenger UstRouter online, PID 2212
[Thu Sep 21 12:26:00.376239 2017] [mpm_event:notice] [pid 18263:tid 140438528898944] AH00489: Apache/2.4.18 (Ubuntu) Phusion_Passenger/5.1.8 configured -- resuming normal operations
[Thu Sep 21 12:26:00.376261 2017] [core:notice] [pid 18263:tid 140438528898944] AH00094: Command line: '/usr/sbin/apache2'
[ N 2017-09-21 12:26:00.5539 877/T1 age/Cor/CoreMain.cpp:1068 ]: Passenger core shutdown finished
[ N 2017-09-21 12:26:02.8255 2206/T8 age/Cor/SecurityUpdateChecker.h:374 ]: Security update check: no update found (next check in 24 hours)
App 2289 stdout:
App 2289 stdout: BONSAI_URL not present, proceeding with Elasticsearch defaults.
App 2430 stdout:
が表示されます、私はAWS上の私のproejctに出て、なぜこの時代を理解することはできませんので、だから私は、サンプルのレールプロジェクトをテストします。その結果、正しく動作します。
私は単純なプロジェクトのconfファイルを表示します。
<VirtualHost *:80>
ServerName ec2-34-229-186-158.compute-1.amazonaws.com # Tell Apache and Passenger where your app's 'public' directory is
DocumentRoot /var/www/simple/public
PassengerRuby /usr/local/rvm/gems/ruby-2.4.1/wrappers/ruby # Relax Apache security settings
<Directory /var/www/simple/public>
Allow from all
Options -MultiViews
# Uncomment this if you're on Apache >= 2.4:
Require all granted
</Directory>
</VirtualHost>
配備のマイレージアプリのみが動作しません。
誰でも手伝ってください。 :)
約6秒かかります。そして、エラーページを表示します。そして、私は完全に構成しました。 – Andrey