Apache2乘客在简单的rails应用程序上导致错误500

时间:2014-12-17 14:53:19

标签: ruby apache ruby-on-rails-4 passenger server

我用rails 4.1.7安装了ruby 2.2.0我尝试安装乘客一切顺利,现在当我访问我的虚拟主机时出现500内部服务器错误,我试过在公共场合添加index.html文件我的应用程序的目录,它正在工作, 将chwon权限更改为$ USER:www-data,将权限更改为777到所有文件和文件夹,但我仍然收到500错误, 一件重要的事情就是我错误地写了“腐烂"而不是" root"在routs.rb和当我尝试它出现乘客错误页面,我的routes.rb文件读取错误然后我修复它但再次得到500错误。

这是我的apache error.log

    majid@majid-Ubuntu:/var/www/html/test_rails/log$ tail /var/log/apache2/error.log
    [ 2014-12-17 19:39:52.0171 19305/7fdd41798700 Pool2/SmartSpawner.h:298 ]: Preloader for /var/www/html/test_rails started on PID 19337, listening on unix:/tmp/passenger.1.0.19298/generation-0/backends/preloader.p0p9xl
    App 19506 stdout: 
    App 19337 stderr: Passenger RackApp: /var/www/html/test_rails: symbol lookup   error: /home/majid/.rbenv/versions/2.2.0-dev/lib/ruby/gems/2.2.0/gems/passenger-4.0.55/buildout/ruby/ruby-2.2.0-x86_64-linux/passenger_native_support.so: undefined symbol: rb_thread_blocking_region
    [Wed Dec 17 19:39:53.033168 2014] [core:error] [pid 19320] [client 127.0.0.1:55690] End of script output before headers: 
    [ 2014-12-17 19:39:58.0277 19305/7fdd4187c700 Pool2/Pool.h:785 ]: Process (pid=19506, group=/var/www/html/test_rails#default) no longer exists! Detaching it from the pool.
    App 19525 stdout: 
    App 19337 stderr: Passenger RackApp: /var/www/html/test_rails: symbol lookup error: /home/majid/.rbenv/versions/2.2.0-dev/lib/ruby/gems/2.2.0/gems/passenger-4.0.55/buildout/ruby/ruby-2.2.0-x86_64-linux/passenger_native_support.so: undefined symbol: rb_thread_blocking_region
    [Wed Dec 17 19:44:06.177450 2014] [core:error] [pid 19321] [client 127.0.0.1:55734] End of script output before headers: 
    [ 2014-12-17 19:44:08.0296 19305/7fdd4187c700 Pool2/Pool.h:785 ]: Process (pid=19525, group=/var/www/html/test_rails#default) no longer exists! Detaching it from the pool.
            App 19843 stdout:   

1 个答案:

答案 0 :(得分:0)

重新安装乘客并配置vhost,因为它在rails应用程序环境中有一些设置。现在它完美地运作.. :)