Hi all…first I wold thank all the people which are visiting and leaving comments on this blog!
I’m currently working on a Ruby On Rails project for the company where I work. According to my company’s bosses decisions all projects have to be developed on a testing server and then switch the project to a production system. Tomorrow I have to prepare the “production” system for my RoR project. So I said to myself: “Please don’t go to the server farm without knowing exactly what to do”. I took an old Fujitsu Notebook (with Japanese keyboard) and installed Debian 5.0.
So I started installing ruby and Ruby On Rails, with all the packages I need, including MySQL server and Apache Httpd 2.2. Something is very easy:
# apt-get install mysql-server
Then I installed Ruby 1.9.1 instead of Ruby 1.8.7 or 1.9.0 that the default for Debian 5’s apt-get repositories.
I wanted the newest and the stablest. So simple as saying configure, make, make install. But started the headache. Once installed all the libraries I needed to make my project work, I had to install the fcgi ruby gem in order to let it work with apache as fastcgi. But
# gem install fcgi
was giving me an error compiling it!!! But it wasn’t caused of missing libraries, it said was the code of gem to be wrong!!! I googled around to solve this problem. I’ve found that was a bug known since 2007 and it still was unsolved. The solution was to modify the source of the fcgi.c file contained in the fcgi-0.8.7 gem.
I coldn’t find an already modified gem, so thanks to Deathsyn’s post on Rubyist I made the modified gem.
The steps were:
# gem unpack fcgi-0.8.7.gem // unpack the gem # cd fcgi-0.8.7/ext/fcgi // go into source folder # vim fcgi.c // modfy gem # ruby extconf.rb // configure the gem # make // compile it # make install // install it!!!
Et voilĂ it worked!!! Now I want to share this gem with you all. Hope this can help. I’m I couldn’t make a real gem. It’s a sort of “zip” package to compile and install. Download the "gem" package here!!!



