ruby-on-rails – 使用Apache乘客错误生产的Rails

ruby-on-rails – 使用Apache乘客错误生产的Rails,第1张

概述最后几天我试图将我的rails应用程序与apache和乘客(没有rvm)一起投入生产,但仍然没有.在我的浏览器中,我收到如下错误: We're sorry, but something went wrong.We've been notified about this issue and we'll take a look at it shortly. 当在我的终端给出tail /var/log 最后几天我试图将我的rails应用程序与apache和乘客(没有rvm)一起投入生产,但仍然没有.在我的浏览器中,我收到如下错误:

We're sorry,but something went wrong.We've been notifIEd about this issue and we'll take a look at it shortly.

当在我的终端给出tail /var/log/apache2/error.log我得到这个:

/home/gre_stag/.rbenv/versions/2.2.2/lib/ruby/2.2.0/irb/ruby-lex.rb:230:in `catch'  /home/gre_stag/.rbenv/versions/2.2.2/lib/ruby/2.2.0/irb/ruby-lex.rb:230:in `each_top_level_statement'  /home/gre_stag/.rbenv/versions/2.2.2/lib/ruby/2.2.0/irb.rb:485:in `eval_input'  /home/gre_stag/.rbenv/versions/2.2.2/lib/ruby/2.2.0/irb.rb:395:in `block in start'  /home/gre_stag/.rbenv/versions/2.2.2/lib/ruby/2.2.0/irb.rb:394:in `catch'  /home/gre_stag/.rbenv/versions/2.2.2/lib/ruby/2.2.0/irb.rb:394:in `start'  /home/gre_stag/.rbenv/versions/2.2.2/bin/irb:11:in `<main>'[ 2015-08-07 12:33:23.9794 4936/7f1db502e700 age/Cor/Req/CheckoutSession.cpp:252 ]: [ClIEnt 1-1] Cannot checkout session because a spawning error occurred. The IDentifIEr of the error is cfaf3a49. Please see earlIEr logs for details about the error.

在/etc/apache2/sites-available/depot.conf我有这个代码:

<VirtualHost *:80>    PassengerRuby /home/gre_stag/.rbenv/versions/2.2.2/bin/irb    Servername depot.local    ServerAlias www.depot.local    Serveradmin webmaster@localhost    PassengerRoot /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini    documentRoot /home/gre_stag/RoR/workspace/depot/public    ErrorLog ${APACHE_LOG_DIR}/error.log    CustomLog ${APACHE_LOG_DIR}/access.log combined    <Directory /home/gre_stag/RoR/workspace/depot/public>        Options FollowSymlinks Includes ExecCGI        AllowOverrIDe All        Require all granted    </Directory></VirtualHost>

我不确定’PassengerRuby’的价值.
这是我第一次使用apache.我将不胜感激任何帮助.

UPDATE

/var/log/apache2/error.log

home/gre_stag/RoR/workspace/Agile_web_dev/depot: An error occured while starting up the preloader.  Error ID: 78043345  Error details saved to: /tmp/passenger-error-zWC057.HTML  Message from application: YAML Syntax error occurred while parsing /home/gre_stag/RoR/workspace/Agile_web_dev/depot/config/database.yml. Please note that YAML must be consistently indented using spaces. Tabs are not allowed. Error: (<unkNown>): mapPing values are not allowed in this context at line 25 column 11 (RuntimeError)  /home/gre_stag/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railtIEs-4.2.1/lib/rails/application/configuration.rb:115:in `rescue in database_configuration'  /home/gre_stag/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railtIEs-4.2.1/lib/rails/application/configuration.rb:98:in `database_configuration'  /home/gre_stag/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activerecord-4.2.1/lib/active_record/railtIE.rb:117:in `block (2 levels) in <class:RailtIE>'  /home/gre_stag/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'  /home/gre_stag/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'  /home/gre_stag/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'  /home/gre_stag/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:44:in `each'  /home/gre_stag/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'

gemifile:

source 'https://rubygems.org'gem 'rails','4.2.1'gem 'sass-rails','~> 5.0'gem 'uglifIEr','>= 1.3.0'gem 'coffee-rails','~> 4.1.0'# See https://github.com/rails/execJs#readme for more supported runtimes# gem 'therubyracer',platforms: :rubygem 'jquery-rails'gem 'jquery-ui-rails'gem 'turbolinks'gem 'jbuilder','~> 2.0'gem 'sdoc','~> 0.4.0',group: :docgem 'bcrypt','~> 3.1.7'# Use Unicorn as the app server# gem 'unicorn'# Use CAPIstrano for deployment# gem 'cAPIstrano-rails',group: :developmentgroup :development,:test do  gem 'byeBUG'  gem 'web-console','~> 2.0'  gem 'spring'  gem 'sqlite3'group :test do  gem 'minitest-reporters','1.0.5'  gem 'mini_backtrace','0.1.3'  gem 'guard-minitest','2.3.1'endgroup :production do  gem 'MysqL2'endend
解决方法 你应该使用ruby binary而不是irb.

将PassengerRuby /home/gre_stag/.rbenv/versions/2.2.2/bin/irb更改为PassengerRuby /home/gre_stag/.rbenv/versions/2.2.2/bin/ruby

总结

以上是内存溢出为你收集整理的ruby-on-rails – 使用Apache乘客错误生产的Rails全部内容,希望文章能够帮你解决ruby-on-rails – 使用Apache乘客错误生产的Rails所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/langs/1270556.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-08
下一篇 2022-06-08

发表评论

登录后才能评论

评论列表(0条)

保存