phusion 乘客独立服务器不工作 [英] phusion passenger standalone server not working
问题描述
如果我使用以下方式运行 phusion:
If I run phusion using:
rvmsudo passenger start -p 80
输出是
>> rvmsudo passenger start -p 80
=============== Phusion Passenger Standalone web server started ===============
PID file: /home/user/site/rails-webpage/tmp/pids/passenger.80.pid
Log file: /home/user/site/rails-webpage/log/passenger.80.log
Environment: development
Accessible via: http://0.0.0.0/
You can stop Phusion Passenger Standalone by pressing Ctrl-C.
===============================================================================
/usr/local/rvm/gems/ruby-1.9.3-p362/gems/therubyracer-0.10.2/ext/v8/v8.so: [BUG] Segmentation fault
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
[\编辑]
在浏览器上,我得到了一个由乘客制作的页面,其中有很多无用的错误.至少对我来说.
on the browser I get a page made by passenger with a lot of not usefull errors. At least for me.
The application spawner server exited unexpectedly: Unexpected end-of-file detected.
Exception class:
PhusionPassenger::Rack::ApplicationSpawner::Error
Backtrace:
# File Line Location
0 /var/lib/passenger-standalone/3.0.18-x86_64-ruby1.8.7-linux-gcc4.6.3-1002/support/lib/phusion_passenger/rack/application_spawner.rb 135 in `start'
1 /var/lib/passenger-standalone/3.0.18-x86_64-ruby1.8.7-linux-gcc4.6.3-1002/support/lib/phusion_passenger/spawn_manager.rb 253 in `spawn_rack_application'
2 /var/lib/passenger-standalone/3.0.18-x86_64-ruby1.8.7-linux-gcc4.6.3-1002/support/lib/phusion_passenger/abstract_server_collection.rb 132 in `lookup_or_add'
3 /var/lib/passenger-standalone/3.0.18-x86_64-ruby1.8.7-linux-gcc4.6.3-1002/support/lib/phusion_passenger/spawn_manager.rb 246 in `spawn_rack_application'
4 /var/lib/passenger-standalone/3.0.18-x86_64-ruby1.8.7-linux-gcc4.6.3-1002/support/lib/phusion_passenger/abstract_server_collection.rb 82 in `synchronize'
5 /var/lib/passenger-standalone/3.0.18-x86_64-ruby1.8.7-linux-gcc4.6.3-1002/support/lib/phusion_passenger/abstract_server_collection.rb 79 in `synchronize'
6 /var/lib/passenger-standalone/3.0.18-x86_64-ruby1.8.7-linux-gcc4.6.3-1002/support/lib/phusion_passenger/spawn_manager.rb 244 in `spawn_rack_application'
7 /var/lib/passenger-standalone/3.0.18-x86_64-ruby1.8.7-linux-gcc4.6.3-1002/support/lib/phusion_passenger/spawn_manager.rb 137 in `spawn_application'
8 /var/lib/passenger-standalone/3.0.18-x86_64-ruby1.8.7-linux-gcc4.6.3-1002/support/lib/phusion_passenger/spawn_manager.rb 275 in `handle_spawn_application'
9 /var/lib/passenger-standalone/3.0.18-x86_64-ruby1.8.7-linux-gcc4.6.3-1002/support/lib/phusion_passenger/abstract_server.rb 357 in `__send__'
10 /var/lib/passenger-standalone/3.0.18-x86_64-ruby1.8.7-linux-gcc4.6.3-1002/support/lib/phusion_passenger/abstract_server.rb 357 in `server_main_loop'
11 /var/lib/passenger-standalone/3.0.18-x86_64-ruby1.8.7-linux-gcc4.6.3-1002/support/lib/phusion_passenger/abstract_server.rb 206 in `start_synchronously'
12 /var/lib/passenger-standalone/3.0.18-x86_64-ruby1.8.7-linux-gcc4.6.3-1002/support/helper-scripts/passenger-spawn-server 99
apache 错误日志是:
the apache error log is:
[Thu Jan 03 20:14:47 2013] [notice] caught SIGTERM, shutting down
[Thu Jan 03 20:14:47 2013] [notice] Apache/2.2.22 (Ubuntu) Phusion_Passenger/3.0.18 configured -- resuming normal operations
[Thu Jan 03 20:14:53 2013] [error] [client 2.34.83.82] File does not exist: /var/www/favicon.ico
[Thu Jan 03 20:14:55 2013] [error] [client 2.34.83.82] File does not exist: /var/www/favicon.ico
[Thu Jan 03 20:23:46 2013] [error] [client 2.34.83.82] File does not exist: /var/www/favicon.ico
[Thu Jan 03 20:24:50 2013] [notice] caught SIGTERM, shutting down
这让我发疯.我不知道从哪里开始.我在 ubuntu 12.04 上运行 rails 3.2,ruby 1.9.3-p362.
This is driving me insane. I have no idea about where to start. I'm running rails 3.2, ruby 1.9.3-p362, on ubuntu 12.04.
我只想部署我的应用程序.
All I want is to deploy my app.
为了提供更多信息,即使它可能不相关,我也尝试运行 apache-passenger-module.我所能做的就是显示标准的 apache 页面,就像 Rails 不在那里一样.我添加了三行加上虚拟主机,但无济于事.厌倦了寻找原因并决定尝试使用独立服务器.但它也不起作用.
Just to give more information, even though it may not be related, I tried running the apache-passenger-module. All I was able to do was to show the standard apache page, like rails wasn't there. I add the three lines plus the virtualhost, but to no avail. Got tired of trying to find the cause and decided to give a try to the standalone server. But it doesn't work either.
推荐答案
我已经使用 rvm 安装了passenger.另外还有另一个版本的 ruby.我删除了另一个版本,卸载了乘客,然后使用
I had installed passenger using rvm. Plus had another version of ruby. I removed both the other version, uninstalled passenger, and re-installed it using
sudo gem install passenger
它有效.
此外,安装后,我必须这样做
Also, after install, I had to do
bundle install
安装必须在 gemfile 上的乘客 gem.
to install the passenger gem which has to be on the gemfile.
这篇关于phusion 乘客独立服务器不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!