fusion passenger issue with json gem when running on nginx

戏子无情 提交于 2019-12-12 02:02:52

问题


I have spent the better half of today trying to resolve an issue where fusion passenger fails to process the request due to some segment fault issue within the json gem.

There have been similar posts regarding this issue, however none of the solutions have appeared to work. I have tried to clear the gems and re bundle, e.g. gemset empty, bundle install.

The interesting this about this is running rails server is ok, and running fusion-passenger stand alone is fine too, only when running under nginx do I have this issue.

/usr/local/rvm/gems/ruby-2.0.0-p481/gems/json-1.8.1/lib/json/common.rb:67: [BUG] Segmentation fault
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]

Web application could not be started
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:

/usr/local/rvm/gems/ruby-2.0.0-p481/gems/json-1.8.1/lib/json/common.rb:67: [BUG] Segmentation fault
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]

回答1:


I found the issue and resolved it. ngnix was defaulting to ruby 1.9.3, a version fusion passenger has installed. I only installed one version 2.0.0 of ruby through rvm. All i had to do was set the nginx config file to the ruby wrapper and all was good. The world is once again a happy place!

passenger_ruby /usr/local/rvm/wrappers/ruby-2.0.0-p481/ruby;


来源:https://stackoverflow.com/questions/26709281/fusion-passenger-issue-with-json-gem-when-running-on-nginx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!