Rails 不使用 apache 和 passenger

Rails not working with apache and passenger

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)

找到了这个问题的解决方案,但出现了另一个问题。之前的问题是路径错误导致应用程序无法执行 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)