ruby-on-rails-3 – Rails Nginx Passenger由于发生了产生错误,因此无法结帐会话

ruby-on-rails-3 – Rails Nginx Passenger由于发生了产生错误,因此无法结帐会话,第1张

概述我有一个Rails 3.2.14应用程序,可以在生产服务器上部署和运行.我正在努力将它部署到另一台服务器上,以便在我推出生产之前测试更改.我正在运行最新版本的passenger / nginx并使用Capistrano 2.12.0和 Ruby 1.9.3-p194,因为这是一个遗留应用程序,我试图模仿环境. 我可以毫无问题地部署应用程序,但它不会产生乘客并启动应用程序. 这是我在/var/log 我有一个Rails 3.2.14应用程序,可以在生产服务器上部署和运行.我正在努力将它部署到另一台服务器上,以便在我推出生产之前测试更改.我正在运行最新版本的passenger / Nginx并使用CAPIstrano 2.12.0和 Ruby 1.9.3-p194,因为这是一个遗留应用程序,我试图模仿环境.

我可以毫无问题地部署应用程序,但它不会产生乘客并启动应用程序.

这是我在/var/log/Nginx/error.log中遇到的错误之一

[ 2014-08-10 07:09:08.7782 733/7f2626fb2700 Pool2/Implementation.cpp:284 ]: Could not spawn process for application /home/deploy/exigencad/current: An error occured while starting up the preloader.  Error ID: aa5360f9  Error details saved to: /tmp/passenger-error-0aEhJZ.HTML  Message from application: cannot load such file -- bundler/setup (LoadError)  /home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'  /home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'  /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:263:in `block in run_load_path_setup_code'  /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:366:in `running_bundler'  /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:261:in `run_load_path_setup_code'  /usr/share/passenger/helper-scripts/rack-preloader.rb:100:in `preload_app'  /usr/share/passenger/helper-scripts/rack-preloader.rb:158:in `<module:App>'  /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'  /usr/share/passenger/helper-scripts/rack-preloader.rb:28:in `<main>'[ 2014-08-10 07:09:08.7874 733/7f2624c8d700 agents/HelperAgent/RequestHandler.h:2305 ]: [ClIEnt 20] Cannot checkout session because a spawning error occurred. The IDentifIEr of the error is . Please see earlIEr logs for details about the error.App 1521 stdout: App 1521 stdout:

我注意到有关bundler的错误,但我确实安装了bundler gem,这是我的输出作为deploy用户或root用户运行:

bundle -vBundler version 1.1.4

这是乘客的具体错误日志文件

<!DOCTYPE HTML PUBliC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/HTML4/strict.dtd"><HTML><head>    <Meta http-equiv="Content-Type" content="text/HTML; charset=UTF-8">    <Meta name="generator" content="Phusion Passenger">    <Title>Web application Could not be started</Title>    <style type="text/CSS">        body {    Font-family: Verdana,'Bitstream Vera Sans',Arial,sans-serif;    Font-size: 10pt;    background: white;    color: #222222;    margin: 0;    padding-top: 3em;    padding-bottom: 3em;    padding-left: 4.5em;    padding-right: 4.5em;}h1 {    Font-size: 17pt;    Font-weight: medium;    color: #533e72;    border-bottom: 1px solID #533e72;}h1.Title {    margin-top: 0;}h1.error_Title {    color: red;    border-bottom: 1px solID red;}a {    text-decoration: none;}a:hover {    text-decoration: underline;}dt {    Font-weight: bold;    color: #280050;}dd {    margin-top: 0.5em;    margin-bottom: 1em;}.commands {    border: 1px solID #b594e7;    background: #ddc6ff;    padding: 0.5em;    margin: 0.5em;    Font-family: 'Bitstream Vera Sans Mono','CourIEr New',Monospace;}pre {    overflow: auto;    white-space: pre-wrap;    text-align: left;}table.backtrace th {    background: #8470a6;    color: white;}table.backtrace th,table.backtrace td {    padding: 0.2em;    padding-left: 0.4em;    padding-right: 0.4em;}table.backtrace tr td {    background: #ecdfff;}table.backtrace tr.even td {    background: #f7f2ff;}table.backtrace td.index {    Font-weight: bold;}#site_footer {    border-top: solID 1px black;    margin-top: 1em;    padding-top: 1em;    Font-size: small;    color: #777777;}#site_footer a {    color: #65498e;}#site_footer a:hover {    color: #9681d9;}#site_header .corporate_IDentity {    display: none;}    </style>    <link rel="stylesheet" type="text/CSS" href="http://www.modrails.com/error_pages/1.0/error_page.CSS">    <style type="text/CSS">        dd {            text-align: left;        }        dd pre {            margin-top: 0;            margin-bottom: 0;        }    </style></head><body>    <div ID="site_container">        <div ID="site_header">            <ul >                <li ><a href="https://www.phusionpassenger.com"><span>Phusion Passenger</span></a></li>            </ul>        </div>        <div ID="site_body">            <h1 >Web application Could not be started</h1>            <div ID="content">                <pre>cannot load such file -- bundler/setup (LoadError)  /home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:<wbr>36:<wbr>in `require&apos;  /home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:<wbr>36:<wbr>in `require&apos;  /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:<wbr>263:<wbr>in `block in run_load_path_setup_code&apos;  /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:<wbr>366:<wbr>in `running_bundler&apos;  /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:<wbr>261:<wbr>in `run_load_path_setup_code&apos;  /usr/share/passenger/helper-scripts/rack-preloader.rb:<wbr>100:<wbr>in `preload_app&apos;  /usr/share/passenger/helper-scripts/rack-preloader.rb:<wbr>158:<wbr>in `&lt;module:<wbr>App&gt;&apos;  /usr/share/passenger/helper-scripts/rack-preloader.rb:<wbr>29:<wbr>in `&lt;module:<wbr>PhusionPassenger&gt;&apos;  /usr/share/passenger/helper-scripts/rack-preloader.rb:<wbr>28:<wbr>in `&lt;main&gt;&apos;</pre>                <dl>                <dt>Error ID</dt>                <dd>aa5360f9</dd>                <dt>Application root</dt>                <dd>/home/deploy/exigencad/current</dd>                <dt>Environment (value of RAILS_ENV,RACK_ENV,Wsgi_ENV,NODE_ENV and PASSENGER_APP_ENV)</dt>                <dd>production</dd>                    <dt>Ruby interpreter command</dt>                    <dd><pre>/home/deploy/.rbenv/shims/ruby</pre></dd>                <dt>User and groups</dt>                <dd><pre>uID=<wbr>1000(deploy) gID=<wbr>1000(deploy) groups=<wbr>1000(deploy),<wbr>27(sudo)</pre></dd>                <dt>Environment variables</dt>                <dd><pre>RBENV_VERSION =<wbr> 1.9.3-p194TERM =<wbr> xterm-256colorSHELL =<wbr> /bin/bashPYTHONUNBUFFERED =<wbr> 1PASSENGER_DEBUG_DIR =<wbr> /tmp/passenger.spawn-deBUG.XXXX3H8hx2SERVER_PORT =<wbr> 80USER =<wbr> deploydocument_ROOT =<wbr> /home/deploy/exigencad/current/publicSCGI =<wbr> 1RBENV_ROOT =<wbr> /home/deploy/.rbenvREQUEST_URI =<wbr> /IN_PASSENGER =<wbr> 1RACK_ENV =<wbr> productionRBENV_HOOK_PATH =<wbr> :<wbr>/home/deploy/.rbenv/rbenv.d:<wbr>/usr/local/etc/rbenv.d:<wbr>/etc/rbenv.d:<wbr>/usr/lib/rbenv/hooksREMOTE_PORT =<wbr> 64649PATH =<wbr> /home/deploy/.rbenv/versions/1.9.3-p194/bin:<wbr>/home/deploy/.rbenv/libexec:<wbr>/home/deploy/.rbenv/plugins/ruby-build/bin:<wbr>/usr/local/sbin:<wbr>/usr/local/bin:<wbr>/sbin:<wbr>/bin:<wbr>/usr/sbin:<wbr>/usr/binWsgi_ENV =<wbr> productionPWD =<wbr> /home/deploy/exigencad/currentLANG =<wbr> en_US.UTF-8NODE_PATH =<wbr> /usr/share/passenger/nodeNODE_ENV =<wbr> productionREMOTE_ADDR =<wbr> 75.89.97.25SERVER_name =<wbr> prod.hcems.comHOME =<wbr> /home/deploySHLVL =<wbr> 0RAILS_ENV =<wbr> productionRBENV_DIR =<wbr> /usr/share/passenger/helper-scriptsSERVER_SOFTWARE =<wbr> Nginx/1.6.0LOGname =<wbr> deployquery_STRING =<wbr> SERVER_ADDR =<wbr> 72.14.181.99SERVER_PROTOCol =<wbr> http/1.1PASSENGER_APP_ENV =<wbr> productionREQUEST_METHOD =<wbr> GET</pre></dd>                <dt>Ulimits</dt>                <dd><pre>UnkNown</pre></dd>                    <dt>System metrics</dt>                    <dd><pre>------------- General -------------Kernel version    :<wbr> 3.15.4-x86_64-linode45Uptime            :<wbr> 14h 3m 25sLoad averages     :<wbr> 0.01%,<wbr> 0.22%,<wbr> 0.27%Fork rate         :<wbr> unkNown------------- cpu -------------Number of cpus    :<wbr>    4Average cpu usage :<wbr>   0%  --   0% user,<wbr>   0% nice,<wbr>   0% system,<wbr> 100% IDle  cpu 1           :<wbr>   0%  --   0% user,<wbr> 100% IDle  cpu 2           :<wbr>   0%  --   0% user,<wbr> 100% IDle  cpu 3           :<wbr>   0%  --   0% user,<wbr> 100% IDle  cpu 4           :<wbr>   0%  --   0% user,<wbr> 100% IDleI/O pressure      :<wbr>   0%  cpu 1           :<wbr>   0%  cpu 2           :<wbr>   0%  cpu 3           :<wbr>   0%  cpu 4           :<wbr>   0%Interference from other VMs:<wbr>   0%  cpu 1                    :<wbr>   0%  cpu 2                    :<wbr>   0%  cpu 3                    :<wbr>   0%  cpu 4                    :<wbr>   0%------------- Memory -------------RAM total         :<wbr>   4002 MBRAM used          :<wbr>    205 MB (5%)RAM free          :<wbr>   3797 MBSwap total        :<wbr>    255 MBSwap used         :<wbr>      0 MB (0%)Swap free         :<wbr>    255 MBSwap in           :<wbr> unkNownSwap out          :<wbr> unkNown</pre></dd>                    <dt>General Ruby interpreter information</dt>                    <dd><pre>RUBY_VERSION =<wbr> 1.9.3RUBY_PLATFORM =<wbr> x86_64-linuxRUBY_ENGINE =<wbr> rubyRubyGems version =<wbr> 1.8.23RubyGems paths =<wbr> [&quot;/home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1&quot;,<wbr> &quot;/home/deploy/.gem/ruby/1.9.1&quot;]</pre></dd>                    <dt>Ruby configuration (RbConfig::CONfig)</dt>                    <dd><pre>DESTDIR =<wbr> MAJOR =<wbr> 1MInor =<wbr> 9TEENY =<wbr> 1PATCHLEVEL =<wbr> 194INSTALL =<wbr> /usr/bin/install -cEXEEXT =<wbr> prefix =<wbr> /home/deploy/.rbenv/versions/1.9.3-p194ruby_install_name =<wbr> rubyRUBY_INSTALL_name =<wbr> rubyRUBY_SO_name =<wbr> rubyexec =<wbr> execruby_pc =<wbr> ruby-1.9.pcPACKAGE =<wbr> rubyBUILTIN_TRANSSRCS =<wbr>  newline.cUSE_RUBYGEMS =<wbr> YESMANTYPE =<wbr> docNROFF =<wbr> /usr/bin/nroffvendorhdrdir =<wbr> /home/deploy/.rbenv/versions/1.9.3-p194/include/ruby-1.9.1/vendor_rubysitehdrdir =<wbr> /home/deploy/.rbenv/versions/1.9.3-p194/include/ruby-1.9.1/site_rubyrubyhdrdir =<wbr> /home/deploy/.rbenv/versions/1.9.3-p194/include/ruby-1.9.1UNIVERSAL_INTS =<wbr> UNIVERSAL_ARCHnameS =<wbr> configure_args =<wbr>  &apos;--prefix=<wbr>/home/deploy/.rbenv/versions/1.9.3-p194&apos; &apos;LDFLAGS=<wbr>-L/home/deploy/.rbenv/versions/1.9.3-p194/lib &apos; &apos;CPPFLAGS=<wbr>-I/home/deploy/.rbenv/versions/1.9.3-p194/include &apos;vendordir =<wbr> /home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/vendor_rubysitedir =<wbr> /home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/site_rubyruby_version =<wbr> 1.9.1sitearch =<wbr> x86_64-linuxarch =<wbr> x86_64-linuxRI_BASE_name =<wbr> rirIDir =<wbr> /home/deploy/.rbenv/versions/1.9.3-p194/share/rirubylibprefix =<wbr> /home/deploy/.rbenv/versions/1.9.3-p194/lib/rubyMAKEfileS =<wbr> MakefileTHREAD_MODEL =<wbr> pthreadSYMBol_PREFIX =<wbr> EXPORT_PREFIX =<wbr> COMMON_headerS =<wbr> COMMON_MACROS =<wbr> COMMON_liBS =<wbr> MAINliBS =<wbr> ENABLE_SHARED =<wbr> noDLDliBS =<wbr>  -lcSOliBS =<wbr> liBRUBYARG_SHARED =<wbr> -Wl,<wbr>-R -Wl,<wbr>/home/deploy/.rbenv/versions/1.9.3-p194/lib -L/home/deploy/.rbenv/versions/1.9.3-p194/lib liBRUBYARG_STATIC =<wbr> -Wl,<wbr>/home/deploy/.rbenv/versions/1.9.3-p194/lib -L/home/deploy/.rbenv/versions/1.9.3-p194/lib -lruby-staticliBRUBYARG =<wbr> -Wl,<wbr>/home/deploy/.rbenv/versions/1.9.3-p194/lib -L/home/deploy/.rbenv/versions/1.9.3-p194/lib -lruby-staticliBRUBY =<wbr> libruby-static.aliBRUBY_AliASES =<wbr> libruby.soliBRUBY_SO =<wbr> libruby.so.1.9.1liBRUBY_A =<wbr> libruby-static.aRUBYW_INSTALL_name =<wbr> rubyw_install_name =<wbr> liBRUBY_DLDFLAGS =<wbr> liBRUBY_LDSHARED =<wbr> gcc -sharedwarnflags =<wbr> -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-fIEld-initializers -Werror=<wbr>pointer-arith -Werror=<wbr>write-strings -Werror=<wbr>declaration-after-statement -Werror=<wbr>implicit-function-declarationdeBUGflags =<wbr> -ggdboptflags =<wbr> -O3cxxflags =<wbr>  -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-fIEld-initializers -Werror=<wbr>pointer-arith -Werror=<wbr>write-strings -Werror=<wbr>declaration-after-statement -Werror=<wbr>implicit-function-declarationcflags =<wbr>  -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-fIEld-initializers -Werror=<wbr>pointer-arith -Werror=<wbr>write-strings -Werror=<wbr>declaration-after-statement -Werror=<wbr>implicit-function-declarationcppflags =<wbr> -I/home/deploy/.rbenv/versions/1.9.3-p194/include NulLCMD =<wbr> :<wbr>INSTALLDOC =<wbr> allCAPITARGET =<wbr> nodocRDOCTARGET =<wbr> rdocEXECUtable_EXTS =<wbr> ARCHfile =<wbr> liBRUBY_relative =<wbr> noEXTOUT =<wbr> .extPREP =<wbr> minirubyTEST_RUNNABLE =<wbr> yessetup =<wbr> SetupEXTSTATIC =<wbr> STRIP =<wbr> strip -S -xTRY_link =<wbr> liBPATHENV =<wbr> LD_liBRARY_PATHRPATHFLAG =<wbr>  -Wl,<wbr>-R%1$-sliBPATHFLAG =<wbr>  -L%1$-slink_SO =<wbr> liBEXT =<wbr> aDLEXT2 =<wbr> DLEXT =<wbr> soLDSHAREDXX =<wbr> g++ -sharedLDSHARED =<wbr> gcc -sharedCCDLFLAGS =<wbr> -fPICSTATIC =<wbr> ARCH_FLAG =<wbr> DLDFLAGS =<wbr> ALLOCA =<wbr> WERRORFLAG =<wbr> -WerrorCHDIR =<wbr> cd -PRMALL =<wbr> rm -frRMDirs =<wbr> rmdir --ignore-fail-on-non-empty -pRMDIR =<wbr> rmdir --ignore-fail-on-non-emptyCP =<wbr> cpRM =<wbr> rm -fPKG_CONfig =<wbr> pkg-configDOXYGEN =<wbr> DOT =<wbr> MAKEDirs =<wbr> /bin/mkdir -pMKDIR_P =<wbr> /bin/mkdir -pINSTALL_DATA =<wbr> /usr/bin/install -c -m 644INSTALL_SCRIPT =<wbr> /usr/bin/install -cINSTALL_PROGRAM =<wbr> /usr/bin/install -cSET_MAKE =<wbr> LN_S =<wbr> ln -sNM =<wbr> nmDLLWRAP =<wbr> WINDRES =<wbr> OBJcopY =<wbr> objcopyOBJDUMP =<wbr> objdumpASFLAGS =<wbr> AS =<wbr> asAR =<wbr> arRANliB =<wbr> ranlibtry_header =<wbr> COUTFLAG =<wbr> -o OUTFLAG =<wbr> -o CPPOUTfile =<wbr> -o conftest.iGNU_LD =<wbr> yesGCC =<wbr> yesEGREP =<wbr> /bin/grep -EGREP =<wbr> /bin/grepCPP =<wbr> gcc -ECXXFLAGS =<wbr>  -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-fIEld-initializers -Werror=<wbr>pointer-arith -Werror=<wbr>write-strings -Werror=<wbr>declaration-after-statement -Werror=<wbr>implicit-function-declarationCXX =<wbr> g++OBJEXT =<wbr> oCPPFLAGS =<wbr> -I/home/deploy/.rbenv/versions/1.9.3-p194/include   -I/home/deploy/.rbenv/versions/1.9.3-p194/include LDFLAGS =<wbr> -L. -L/home/deploy/.rbenv/versions/1.9.3-p194/lib  -rdynamic -Wl,<wbr>-export-dynamicCFLAGS =<wbr>  -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-fIEld-initializers -Werror=<wbr>pointer-arith -Werror=<wbr>write-strings -Werror=<wbr>declaration-after-statement -Werror=<wbr>implicit-function-declarationCC =<wbr> gcctarget_os =<wbr> linuxtarget_vendor =<wbr> unkNowntarget_cpu =<wbr> x86_64target =<wbr> x86_64-unkNown-linux-gnuhost_os =<wbr> linux-gnuhost_vendor =<wbr> unkNownhost_cpu =<wbr> x86_64host =<wbr> x86_64-unkNown-linux-gnuRUBYW_BASE_name =<wbr> rubywRUBY_BASE_name =<wbr> rubybuild_os =<wbr> linux-gnubuild_vendor =<wbr> unkNownbuild_cpu =<wbr> x86_64build =<wbr> x86_64-unkNown-linux-gnuRUBY_RELEASE_DATE =<wbr> 2012-04-20RUBY_PROGRAM_VERSION =<wbr> 1.9.3BASERUBY =<wbr> echo executable host ruby is required.  use --with-baseruby option.;<wbr> falsetarget_alias =<wbr> host_alias =<wbr> build_alias =<wbr> liBS =<wbr> -lpthread -lrt -ldl -lcrypt -lm ECHO_T =<wbr> ECHO_N =<wbr> -nECHO_C =<wbr> DEFS =<wbr> mandir =<wbr> /home/deploy/.rbenv/versions/1.9.3-p194/share/manlocaledir =<wbr> /home/deploy/.rbenv/versions/1.9.3-p194/share/localelibdir =<wbr> /home/deploy/.rbenv/versions/1.9.3-p194/libpsdir =<wbr> /home/deploy/.rbenv/versions/1.9.3-p194/share/doc/rubypdfdir =<wbr> /home/deploy/.rbenv/versions/1.9.3-p194/share/doc/rubydvIDir =<wbr> /home/deploy/.rbenv/versions/1.9.3-p194/share/doc/rubyHTMLdir =<wbr> /home/deploy/.rbenv/versions/1.9.3-p194/share/doc/rubyinfodir =<wbr> /home/deploy/.rbenv/versions/1.9.3-p194/share/infodocdir =<wbr> /home/deploy/.rbenv/versions/1.9.3-p194/share/doc/rubyoldincludedir =<wbr> /usr/includeincludedir =<wbr> /home/deploy/.rbenv/versions/1.9.3-p194/includelocalstatedir =<wbr> /home/deploy/.rbenv/versions/1.9.3-p194/varsharedstatedir =<wbr> /home/deploy/.rbenv/versions/1.9.3-p194/comsysconfdir =<wbr> /home/deploy/.rbenv/versions/1.9.3-p194/etcdatadir =<wbr> /home/deploy/.rbenv/versions/1.9.3-p194/sharedaTarootdir =<wbr> /home/deploy/.rbenv/versions/1.9.3-p194/sharelibexecdir =<wbr> /home/deploy/.rbenv/versions/1.9.3-p194/libexecsbindir =<wbr> /home/deploy/.rbenv/versions/1.9.3-p194/sbinbindir =<wbr> /home/deploy/.rbenv/versions/1.9.3-p194/binexec_prefix =<wbr> /home/deploy/.rbenv/versions/1.9.3-p194PACKAGE_URL =<wbr> PACKAGE_BUGREPORT =<wbr> PACKAGE_STRING =<wbr> PACKAGE_VERSION =<wbr> PACKAGE_TARname =<wbr> PACKAGE_name =<wbr> PATH_SEParaTOR =<wbr> :<wbr>SHELL =<wbr> /bin/bashrubylibdir =<wbr> /home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1archdir =<wbr> /home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/x86_64-linuxsitelibdir =<wbr> /home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/site_ruby/1.9.1sitearchdir =<wbr> /home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/site_ruby/1.9.1/x86_64-linuxvendorlibdir =<wbr> /home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/vendor_ruby/1.9.1vendorarchdir =<wbr> /home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/vendor_ruby/1.9.1/x86_64-linuxtopdir =<wbr> /home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/x86_64-linux</pre></dd>                    <dt>Ruby load path ($LOAD_PATH)</dt>                    <dd><pre>/home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/site_ruby/1.9.1/home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/site_ruby/1.9.1/x86_64-linux/home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/site_ruby/home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/vendor_ruby/1.9.1/home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/vendor_ruby/1.9.1/x86_64-linux/home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/vendor_ruby/home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/x86_64-linux</pre></dd>                    <dt>Ruby loaded librarIEs ($LOADED_FEATURES)</dt>                    <dd><pre>enumerator.so/home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/x86_64-linux/enc/encdb.so/home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/x86_64-linux/enc/trans/transdb.so/home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/defaults.rb/home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/x86_64-linux/rbconfig.rb/home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/deprecate.rb/home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/exceptions.rb/home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb/home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems.rb/usr/lib/ruby/vendor_ruby/phusion_passenger.rb/home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/x86_64-linux/etc.so/home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/fileutils.rb/home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/tmpdir.rb/usr/lib/ruby/vendor_ruby/phusion_passenger/utils/tmpio.rb/usr/lib/ruby/vendor_ruby/phusion_passenger/platform_info.rb/usr/lib/ruby/vendor_ruby/phusion_passenger/platform_info/operating_system.rb/home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/version.rb/home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/requirement.rb/home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/platform.rb/home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/specification.rb/home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/path_support.rb/usr/lib/ruby/vendor_ruby/phusion_passenger/platform_info/ruby.rb/usr/lib/ruby/vendor_ruby/phusion_passenger/platform_info/binary_compatibility.rb/home/deploy/.passenger/native_support/4.0.48/ruby-1.9.3-x86_64-linux/passenger_native_support.so/usr/lib/ruby/vendor_ruby/phusion_passenger/native_support.rb/home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/x86_64-linux/socket.so/home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/socket.rb/home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/thread.rb/usr/lib/ruby/vendor_ruby/phusion_passenger/ruby_core_enhancements.rb/usr/lib/ruby/vendor_ruby/phusion_passenger/utils/tmpdir.rb/usr/lib/ruby/vendor_ruby/phusion_passenger/preloader_shared_helpers.rb/usr/lib/ruby/vendor_ruby/phusion_passenger/constants.rb/usr/lib/ruby/vendor_ruby/phusion_passenger/public_API.rb/usr/lib/ruby/vendor_ruby/phusion_passenger/deBUG_logging.rb/home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/shellwords.rb/usr/lib/ruby/vendor_ruby/phusion_passenger/utils/shellwords.rb/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb/home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/x86_64-linux/fcntl.so/usr/lib/ruby/vendor_ruby/phusion_passenger/message_channel.rb/usr/lib/ruby/vendor_ruby/phusion_passenger/utils.rb/usr/lib/ruby/vendor_ruby/phusion_passenger/message_clIEnt.rb/usr/lib/ruby/vendor_ruby/phusion_passenger/utils/native_support_utils.rb/usr/lib/ruby/vendor_ruby/phusion_passenger/utils/unseekable_socket.rb/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb/home/deploy/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/x86_64-linux/stringio.so/usr/lib/ruby/vendor_ruby/phusion_passenger/utils/tee_input.rb/usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb/usr/lib/ruby/vendor_ruby/phusion_passenger/union_station/connection.rb/usr/lib/ruby/vendor_ruby/phusion_passenger/union_station/transaction.rb/usr/lib/ruby/vendor_ruby/phusion_passenger/utils/lock.rb/usr/lib/ruby/vendor_ruby/phusion_passenger/union_station/core.rb</pre></dd>                </dl>            </div>        </div>        <div ID="site_footer">            <!--               You are free to modify the footer as you see fit,but we kindly ask of you to preserve to following               text. Thank you.            -->            <div >                Powered by <a href="https://www.phusionpassenger.com/">Phusion Passenger</a>,<tt>mod_rails</tt> / <tt>mod_rack</tt> for Apache and Nginx.            </div>        </div>    </div></body></HTML>

这是我的cAPIstrano deploy.rb,以防它有所帮助(注意,在生产服务器上工作,但当我将IP更改为它部署的登台服务器但不运行rake任务或每当gem设置crontab时):

require "bundler/cAPIstrano"set :whenever_command,"bundle exec whenever"require "whenever/cAPIstrano"server "72.14.181.01",:web,:app,:db,primary: trueset :application,"appname"set :user,"deploy"set :deploy_to,"/home/#{user}/#{application}"#set :deploy_via,:remote_cacheset :use_sudo,falseset :rails_env,"production"set :scm,"git"set :repository,"git@github.com:appguy/#{application}.git"set :branch,"master"default_run_options[:pty] = truessh_options[:forward_agent] = trueafter "deploy","deploy:cleanup" # keep only the last 5 releasesafter "deploy:update","gps_Listener:restart"namespace :deploy do  task :start do ; end  task :stop do ; end  task :restart,:roles => :app,:except => { :no_release => true } do    run "#{try_sudo} touch #{file.join(current_path,'tmp','restart.txt')}"  end  desc "reload the database with seed data"  task :seed do    run "cd #{current_path}; bundle exec rake db:seed RAILS_ENV=#{rails_env}"  endendnamespace :gps_Listener do  task :start do    run "#{sudo} start app-gps"  end  task :stop do    run "#{sudo} stop app-gps"  end  task :restart do    run "#{sudo} stop app-gps && sleep 1 && #{sudo} start app-gps"  endendtask :after_update_code do  run "ln -nfs #{deploy_to}/shared/config/database.yml #{release_path}/config/database.yml"  run "cd #{current_path}; RAILS_ENV=#{rails_env} bundle exec rake gps:Listen"end

我承认,自从我不得不引导一台新服务器以来,已经很长时间(1 – 2年),因此使用新版本的passenger / Nginx重新创建这个遗留应用程序会让人觉得麻烦.我不确定这是乘客本身的问题还是它是一个ruby问题.

这是我的Nginx btw乘客配置:

/etc/Nginx/Nginx.conf

passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini;   passenger_ruby /home/deploy/.rbenv/shims/ruby;

这是/ etc / Nginx / site-available / default的默认虚拟主机

server {        Listen 80 default_server;        Listen [::]:80 default_server ipv6only=on;        server_name prod.hcems.com;        passenger_enabled on;        rails_env    production;        root         /home/deploy/exigencad/current/public;        # redirect server error pages to the static page /50x.HTML        error_page   500 502 503 504  /50x.HTML;        location = /50x.HTML {            root   HTML;        }}
解决方法 看起来问题出在我的.bashrc文件中.

我在文件的底部有以下内容:

if [ -f /etc/bash_completion ] && ! shopt -oq posix; then    . /etc/bash_completionfiexport PATH="$HOME/.rbenv/bin:$PATH"eval "$(rbenv init -)"export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"

哪个没有设置我的rbenv环境变量.一旦我将它移动到.bashrc的顶部,我就可以部署而不会出错.乘客现在转动应用程序.

我的宝石似乎没有工作(设置我的crontab用于rake任务),但我会打开另一个问题.

总结

以上是内存溢出为你收集整理的ruby-on-rails-3 – Rails Nginx Passenger由于发生了产生错误,因此无法结帐会话全部内容,希望文章能够帮你解决ruby-on-rails-3 – Rails Nginx Passenger由于发生了产生错误,因此无法结帐会话所遇到的程序开发问题。

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

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

原文地址: http://outofmemory.cn/langs/1282394.html

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

发表评论

登录后才能评论

评论列表(0条)

保存