Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/66.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 部署失败,因为许可证[Passenger&x2B;nginx]_Ruby On Rails_Nginx_Amazon Ec2_Passenger - Fatal编程技术网

Ruby on rails 部署失败,因为许可证[Passenger&x2B;nginx]

Ruby on rails 部署失败,因为许可证[Passenger&x2B;nginx],ruby-on-rails,nginx,amazon-ec2,passenger,Ruby On Rails,Nginx,Amazon Ec2,Passenger,我是部署领域的新手,我尝试在amzone ES2上部署我的rails应用程序 我在nginx.conf文件中做了一些更改,这需要查找ruby路径并使其工作正常,我还能够重新启动nginx 但当我试图通过IP访问网页时,它会抛出错误,如下图所示 下面是服务器的日志 App 4334 stdout: [ 2017-03-12 02:08:02.1355 2511/7f805c0c8700 age/Cor/App/Implementation.cpp:304 ]: Could not spawn

我是部署领域的新手,我尝试在amzone ES2上部署我的rails应用程序

我在nginx.conf文件中做了一些更改,这需要查找ruby路径并使其工作正常,我还能够重新启动nginx

但当我试图通过IP访问网页时,它会抛出错误,如下图所示

下面是服务器的日志

App 4334 stdout: 
[ 2017-03-12 02:08:02.1355 2511/7f805c0c8700 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /home/deploy/sample_app: An error occurred while starting up the preloader.
  Error ID: 987308d1
  Error details saved to: /tmp/passenger-error-qds73G.html
  Message from application: Permission denied @ rb_sysopen - /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini (Errno::EACCES)
  /usr/lib/ruby/vendor_ruby/phusion_passenger.rb:282:in `initialize'
  /usr/lib/ruby/vendor_ruby/phusion_passenger.rb:282:in `open'
  /usr/lib/ruby/vendor_ruby/phusion_passenger.rb:282:in `parse_ini_file'
  /usr/lib/ruby/vendor_ruby/phusion_passenger.rb:99:in `locate_directories'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:75:in `init_passenger'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:155:in `<module:App>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<main>'


[ 2017-03-12 02:08:02.1385 2511/7f805d55c700 age/Cor/Con/CheckoutSession.cpp:285 ]: [Client 1-4] Cannot checkout session because a spawning error occurred. The identifier of the error is 987308d1. Please see earlier logs for details about the error.

你发现了吗?@jackRothrock告诉我你有什么问题吗?rvmsudo,capistrano使用正确的ruby版本构建,passenger.conf指向完全相同的ruby版本。你重新启动了
nginx
是的,我重新启动了它。你发现了吗?@jackRothrock告诉我你有什么问题吗?rvmsudo,capistrano使用正确的ruby版本构建,passenger.conf指向的ruby版本与您重新启动时的版本完全相同
App 5491 stdout: 
App 5491 stderr:  [passenger_native_support.so] trying to compile for the current user (deploy) and Ruby interpreter...
App 5491 stderr:      (set PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0 to disable)
App 5491 stderr: Unable to autodetect the currently active RVM gem set name. This could happen if you ran this program using 'sudo' instead of 'rvmsudo'. When using RVM, you're always supposed to use 'rvmsudo' instead of 'sudo!'.
App 5491 stderr: 
App 5491 stderr: Please try rerunning this program using 'rvmsudo'. If that doesn't help, please contact this program's author for support.
[ 2017-03-12 02:38:31.4982 5425/7f203e5c7700 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /home/deploy/sample_app: An error occurred while starting up the preloader.
  Error ID: c80d4a5e
  Error details saved to: /tmp/passenger-error-YnUzbb.html
  Message from application: exit (SystemExit)
  /usr/lib/ruby/vendor_ruby/phusion_passenger/platform_info/ruby.rb:311:in `exit'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/platform_info/ruby.rb:311:in `rvm_ruby_string'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/platform_info.rb:98:in `rvm_ruby_string'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/platform_info/ruby.rb:69:in `ruby_command'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/platform_info.rb:98:in `ruby_command'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/native_support.rb:337:in `block (3 levels) in compile'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/native_support.rb:335:in `chdir'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/native_support.rb:335:in `block (2 levels) in compile'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/utils/tmpio.rb:70:in `mktmpdir'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/native_support.rb:334:in `block in compile'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/native_support.rb:378:in `block (2 levels) in try_directories'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/native_support.rb:377:in `chdir'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/native_support.rb:377:in `block in try_directories'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/native_support.rb:371:in `each'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/native_support.rb:371:in `each_with_index'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/native_support.rb:371:in `try_directories'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/native_support.rb:329:in `compile'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/native_support.rb:219:in `compile_and_load'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/native_support.rb:52:in `start'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/native_support.rb:439:in `<top (required)>'