# Ruby 1.9.1 and Rails on Ubuntu

**URL:** <https://www.ruby-forum.com/t/ruby-1-9-1-and-rails-on-ubuntu/170065>\
**Category:** Rails\
**Created:** [June 11, 2009, 9:52pm UTC](https://www.ruby-forum.com/t/ruby-1-9-1-and-rails-on-ubuntu/170065 "2009-06-11T21:52:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![elricstorm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/da6949/32.png) [@elricstorm](https://www.ruby-forum.com/u/elricstorm)\
**Post date:** [June 11, 2009, 9:52pm UTC](https://www.ruby-forum.com/t/ruby-1-9-1-and-rails-on-ubuntu/170065/1 "2009-06-11T21:52:10Z")

</div>

After successfully compiling 1.9.1 and updating the gem environment on  
my vbox, I performed the following:

sudo gem install capistrano rails test-unit rspec-rails rake-compiler  
sqlite3-ruby hectoregm-mysql-ruby gem\_plugin

1. cd /usr/local/lib/ruby/gems/1.9.1/gems/mongrel-1.1.5/ext/http11
2. sudo vi / mate on http11.c and:  
replace line 77 with  
for(ch = RSTRING\_PTR(f), end = ch + RSTRING\_LEN(f); ch \< end; ch++) {  
replace line 172 with  
colon = strchr(RSTRING\_PTR(temp), ‘:’);  
replace line 174 with  
rb\_hash\_aset(req, global\_server\_name, rb\_str\_substr(temp, 0, colon -  
RSTRING\_PTR(temp)));  
replce line 176,177  
rb\_str\_substr(temp, colon - RSTRING\_PTR(temp)+1,  
RSTRING\_LEN(temp)));  
replace lines 298 299  
dptr = RSTRING\_PTR(data);  
dlen = RSTRING\_LEN(data);
3. save the file, close the vi / textmate
4. sudo ruby extconf.rb && sudo make && sudo make install
5. cd …/…/lib/mongrel  
(or the full path  
“/usr/local/lib/ruby/gems/1.9.1/gems/mongrel-1.1.5/lib/mongrel”
6. mate / sudo vi handlers.rb
7. fix the case statements in  
On lines 208-212, change instances of “: false” to “then false”
8. sudo gem install gem\_plugin (else mongrel may hang)  
done!

This gives me:

Capistrano  
rails 2.3.2  
rake-compiler  
gem\_plugin  
mysql 2.8  
sqlite3  
test-unit  
Mongrel 1.1.5

…

Are there any other gems I will need to consider on my vbox and/or any  
gems that might need to be installed on my VPS that aren’t listed here?

Thanks.
