我正在使用rails,capistrano和nginx部署应用程序。在开发环境中,即使在另一台PC上调试应用程序,一切都很好。但是当我将应用程序部署到生产环境时,我遇到了一些问题。当我打开浏览器时,我面对以下经典消息:“我们很抱歉,但出了点问题”。我试图在/log/production.log中找到一些东西,但文件是空的,即使我给了项目文件夹的写权限。另外,我试图在/config/environments/production.rb中更改选项Conside_all_requests_local = true,但消息仍然相同。这里的问题是我找不到错误消息的来源。即使我在我的开发环境中运行'rake test'也一切都很好。这是我的Gemfile和nginx日志文件(/var/log/nginx/error.log):
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 'rails-jquery-tokeninput'
gem 'mongoid', '~> 4.0.0'
gem 'bson_ext'
gem 'devise'
gem "recaptcha", require: "recaptcha/rails"
gem "mongoid-paperclip", :require => "mongoid_paperclip"
gem 'mini_magick', '~> 4.3'
gem 'simple_form'
gem 'country_select'
# twitter bootstrap css & javascript toolkit
gem 'twitter-bootswatch-rails', :github => ' scottvrosenthal/twitter-bootswatch-rails'
# twitter bootstrap helpers gem, e.g., alerts etc...
gem 'twitter-bootswatch-rails-helpers'
gem "less-rails" #Sprockets (what Rails 3.1 uses for its asset pipeline) supports LESS
gem 'twitter-bootstrap-rails', :git => ' git://github.com/seyhunak/twitter-bootstrap-rails.git'
gem 'mongo'
gem "sprockets", '3.6.3'
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug'
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'
#capistrano
gem 'capistrano', '~> 3.4.0'
gem 'capistrano-rails', '~> 1.1.3'
gem 'capistrano-rvm', github: "capistrano/rvm"
端
[ 2016-10-14 15:05:53.2730 53176/7f7d9072f700 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /home/deploy/comigo_sn/current: An error occurred while starting up the preloader. It exited before signalling successful startup back to Phusion Passenger.
Error ID: 2eeee637
Error details saved to: /tmp/passenger-error-ndXlo8.html
Message from application: An error occurred while starting up the preloader. It exited before signalling successful startup back to Phusion Passenger. Please read <a href="https://github.com/phusion/passenger/wiki/Debugging-application-startup-problems">this article</a> for more information about this problem.<br>
<h2>Raw process output:</h2>
<pre>
*** ERROR ***: Cannot execute /home/deploy/.rvm/wrappers/ruby-2.3.1p112/ruby: No such file or directory (2)
</pre>
[ 2016-10-14 15:05:53.2840 53176/7f7d898f6700 age/Cor/Con/CheckoutSession.cpp:285 ]: [Client 2-3] Cannot checkout session because a spawning error occurred. The identifier of the error is 2eeee637. Please see earlier logs for details about the error
我希望有人可以帮我找到问题的根源。你能帮我找到如何找到它吗?