I had troubles to compile thrift on CentOS 5.8 with ruby 1.9.3 and 1.8.7 in RVM.
- For 1.9.3, I ran "bundle install", but failed in compiling mongrel-1.1.5. mongrel-1.1.5 is not compatible with Ruby 1.9.3. Using mongrel-1.2.0pre2, it will be ok. You need to rerun "./configure" if you change the ruby version in RVM. And when you install, you have to pass your ANT_HOME and rvm_path if root doesn't have them.
vi thrift-0.8.0/lib/rb/thrift.gemspec s.add_development_dependency "mongrel", "1.2.0pre2" cd thrift-0.8.0/lib/rb bundle install cd ../../.. ./configure make sudo ANT_HOME=$ANT_HOME rvm_path=$rvm_path bash -c "source /home/bewang/.rvm/scripts/rvm && rvm use 1.9.3 && make install"
- For 1.8.7, I ran "bundle install" without any problem, but the compilation failed sometimes with this rspec error.
Spec::Mocks::MockExpectationError in 'Thrift::UNIXSocket should raise an error when read times out' < IO class> expected :select with (any args) once, but received it twice /home/bewang/temp/thrift-0.8.0/lib/rb/spec/socket_spec_shared.rb:94:
sudo yum install automake libtool flex bison pkgconfig gcc-c++ boost-devel libevent-devel zlib-devel python-devel ruby-devel tar zxvf thrift-0.8.0.tar.gz ./configure --without-ruby make sudo ANT_HOME=$ANT_HOME make install