Ruby 2.1.6 vs 2.2.2 / CentOS 6.6 / fcgid problem

Hi Everyone,

I’ve run into a problem and would appreciate any help on the matter.

I run my Ruby app with Apache and fcgid on the following platforms

Host OS: Scientific Linux 6.6 (64 bit)
Ruby: 2.1.6 and 2.2.2 too

Host OS: CentOS 6.6 (64 bit)
Ruby: 2.1.6

I’ve got problems running on the following:

Host OS: CentOS 6.6 (64 bit)
Ruby: 2.2.2

So Ruby 2.2.2 compiles fine with good tests (make test) on my CentOS
system, but when I restart the httpd server, I get the following error
message in httpd logs:

[warn] [client x.x.x.x] mod_fcgid: error reading data, FastCGI server
closed connection
[Sun May 24 07:51:40 2015] [error] [client x.x.x.x] Premature end of
script headers: myapp.rb.fcgi

Whenever I switch back to 2.1.6 by running “make install” and “service
httpd restart”, everything works fine. (I install Ruby from source).

What can be the difference between Ruby 2.1 and 2.2 that causes the
fcgid fail on CentOS? What can be the difference between SL 6 and CentOS
6 whilst they should almost be identical both being a clone of RHEL 6?