So Ruby Enterprise Edition doesn't compile on Ubuntu 8.10. It appears as though the version of GCC that comes bundled in Intrepid's build-essential (4.3.2-1ubuntu11) is too awesome for REE to handle. Actually, it's due to some path hacking that REE does to work on systems like FreeBSD, but I digress...

So you've all but given up hope of getting REE to work on your Intrepid install. But fear not; the change is actually really simple! In order to make it compile properly, you just need to apply the following patch to the REE source:
--- /tmp/ruby-enterprise-1.8.6-20080810/installer.rb
+++ ruby-enterprise-1.8.6-20080810/installer.rb
@@ -159,9 +159,9 @@
@destdir += "/"
end

- ENV['C_INCLUDE_PATH'] = "#{@destdir}#{@prefix}/include:/usr/include:/usr/local/include:#{ENV['C_INCLUDE_PATH']}"
- ENV['CPLUS_INCLUDE_PATH'] = "#{@destdir}#{@prefix}/include:/usr/include:/usr/local/include:#{ENV['CPLUS_INCLUDE_PATH']}"
- ENV['LD_LIBRARY_PATH'] = "#{@destdir}#{@prefix}/lib:#{ENV['LD_LIBRARY_PATH']}"
+ #ENV['C_INCLUDE_PATH'] = "#{@destdir}#{@prefix}/include:/usr/include:/usr/local/include:#{ENV['C_INCLUDE_PATH']}"
+ #ENV['CPLUS_INCLUDE_PATH'] = "#{@destdir}#{@prefix}/include:/usr/include:/usr/local/include:#{ENV['CPLUS_INCLUDE_PATH']}"
+ #ENV['LD_LIBRARY_PATH'] = "#{@destdir}#{@prefix}/lib:#{ENV['LD_LIBRARY_PATH']}"


--- /tmp/ruby-enterprise-1.8.6-20080810/source/vendor/google-perftools-0.98/src/base/linuxthreads.c
+++ ruby-enterprise-1.8.6-20080810/source/vendor/google-perftools-0.98/src/base/linuxthreads.c
@@ -49,7 +49,7 @@
#include <asm/fcntl.h>
#include <asm/posix_types.h>
#include <asm/types.h>
-#include <linux/dirent.h>
+#include <dirent.h>
For those not well-versed in the intricacies of diff, you need to comment out the three ENV lines in installer.rb starting at line 161, and you need to change the <linux/dirent.h> include directive to point to plain ol' <dirent.h> in source/vendor/google-perftools-0.98/src/base/linuxthreads.c. The rest of the Ruby Enterprise Edition install works the same as in the documentation.

That's all there is to it. :-D

If you found this post at all useful, I would encourage you to buy an Enterprise License for Ruby Enterprise Edition to support Phusion. The gods of Karma will thank you.

Leave a Comment

back to top

© 2008; powered by ruby enterprise edition and mephisto