Rails无法与Apache和乘客配合使用

埃泽奎尔

Listen 81
<VirtualHost 192.168.1.43:81>
  ServerName localhost ServerAlias www.example.com ServerAdmin webmaster@localhost DocumentRoot /home/eze/Appp/public RailsEnv development ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined
  <Directory "/home/eze/Appp/public">
    Options FollowSymLinks Require all granted
  </Directory>
</VirtualHost>

嗨,艾姆,当我尝试从apache和passenger使用我的rails应用程序时出现以下错误,我是apache的新手,我现在不知道怎么回事,帮忙!

An error occurred while starting up the preloader. It exited before signalling successful startup back to Phusion Passenger. Please read this article for more information about this problem.
Raw process output:

*** ERROR ***: Cannot execute /usr/bin/ruby: No such file or directory (2)
Error ID
3f83f023


Application root
/home/eze/Appp


Environment (value of RAILS_ENV, RACK_ENV, WSGI_ENV, NODE_ENV and PASSENGER_APP_ENV)
development


Ruby interpreter command
/usr/bin/ruby


User and groups
uid=1000(eze) gid=1000(eze) groups=1000(eze),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),108(lpadmin),124(sambashare),128(libvirtd)
埃泽奎尔

找到了解决该问题的方法,但又出现了另一种方法。以前的问题是路径错误,因此que app无法执行ruby解释器,但是现在这是新的问题输出

It looks like Bundler could not find a gem. Maybe you didn't install all the gems that this application needs. To install your gems, please run: bundle install If that didn't work, then the problem is probably caused by your application being run under
a different environment than it's supposed to. Please check the following: 

Is this app supposed to be run as the eze user? 

Is this app being run on the correct Ruby interpreter? Below you will see which Ruby interpreter Phusion Passenger attempted to use.


The exception is as follows:
 Could not find rake-10.4.2 in any of the sources (Bundler::GemNotFound)

 /home/eze/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler/spec_set.rb:92:in `block in materialize' /home/eze/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler/spec_set.rb:85:in
`map!' /home/eze/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler/spec_set.rb:85:in `materialize' /home/eze/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler/definition.rb:133:in `specs' /home/eze/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler/definition.rb:178:in
`specs_for' /home/eze/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler/definition.rb:167:in `requested_specs' /home/eze/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler/environment.rb:18:in `requested_specs' /home/eze/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler/runtime.rb:13:in
`setup' /home/eze/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler.rb:120:in `setup' /home/eze/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler/setup.rb:17:in `
<top (required)>' /home/eze/.rbenv/versions/2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:128:in `require' /home/eze/.rbenv/versions/2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require' /home/eze/.rbenv/versions/2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:39: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>'

Error ID 91901b3a 

Application root /home/eze/Appp Environment (value of RAILS_ENV, RACK_ENV, WSGI_ENV, NODE_ENV and PASSENGER_APP_ENV) development Ruby interpreter command /home/eze/.rbenv/versions/2.1.2/bin/ruby User and groups uid=1000(eze)
        gid=1000(eze) groups=1000(eze),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),108(lpadmin),124(sambashare),128(libvirtd)

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章