# 10.04 Ubuntu

**URL:** <https://www.ruby-forum.com/t/10-04-ubuntu/201756>\
**Category:** wxRuby\
**Created:** [January 13, 2011, 10:07pm UTC](https://www.ruby-forum.com/t/10-04-ubuntu/201756 "2011-01-13T22:07:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [January 13, 2011, 10:07pm UTC](https://www.ruby-forum.com/t/10-04-ubuntu/201756/1 "2011-01-13T22:07:44Z")

</div>

Hi, Chauk-Mean and all -

I have just ported everything to 10.04 ubuntu, and I am pleased to note  
that  
I was able to use prepackaged stuff almost everywhere.

Yes, it was painful before I figured it out. 🙂

I used apt-get to install ruby-1.8.7, all the wx libraries (including  
the  
dev header packages)

I uninstalled the debian rubygems package completely and installed  
rubygems-1.4.1 from the source.

I then installed everything else (including wxruby-2.0.1) from gems. The  
gem  
manager does not appear to be able to work its way through a proxy  
server,  
so I downloaded all the necessary gems by hand.

Attached is the pertinent code from my installer script.

```
puts "Installing Ruby tools, SWIG and wxWidgets development 

```

libraries"  
puts " ( This may take a little while )"  
%x{ apt-get install -y ruby1.8-dev rake swig }  
%x{ apt-get install -y --reinstall libgtk2.0-0 libgtk2.0-dev }  
%x{ apt-get install -y --reinstall libwxbase2.8-0 libwxbase2.8-dev  
libwxbase2.8-dbg }  
%x{ apt-get install -y --reinstall wx-common libwxgtk2.8-0  
libwxgtk2.8-dev }  
puts “Copying Ruby libraries to /usr/local/etc for installation”  
FileUtils.cp %w( rubygems-1.4.1.tgz ruby-sysvipc-0.9.1.tar.gz  
prawn.tgz  
), ‘/usr/local/etc’  
FileUtils.cd ‘/usr/local/etc’ do  
puts “Installing updated RubyGems package manager.”  
%x{ tar -zxvf rubygems-1.4.1.tgz }  
FileUtils.cd ‘./rubygems-1.4.1’ do  
%x{ ruby ./setup.rb }  
begin  
%x{ rm /usr/bin/gem }  
%x{ ln -s /usr/bin/gem1.8 /usr/bin/gem }  
end  
puts “Installing SysV IPC library for Shared Memory and  
Semaphores”  
%x{ tar -zxvf ruby-sysvipc-0.9.1.tar.gz }  
FileUtils.cd ‘./ruby-sysvipc-0.9.1’ do  
%x{ ruby ./setup.rb }  
%x{ gem install ./SysVIPC-0.9.1.gem }  
end  
puts “Installing Prawn library for PDF generation”  
%x{ tar -zxvf prawn.tgz }  
FileUtils.cd ‘./prawn’ do  
%x{ gem install rake test-spec pdf-reader mocha }  
%x{ rake }  
%x{ gem build prawn.gemspec }  
%x{ gem install prawn-0.11.1.pre.gem }  
end  
FileUtils.rm %w( rubygems-1.4.1.tgz ruby-sysvipc-0.9.1.tar.gz  
prawn.tgz )  
end  
puts “Installing wxRuby wrapper around wxWidgets C++ libraries”  
%x{ gem install ./wxruby-2.0.1-x86-linux.gem }

---

<div class="post-metadata">

**Author:** ![walkins](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/96bed5/32.png) [@walkins](https://www.ruby-forum.com/u/walkins)\
**Post date:** [January 13, 2011, 10:09pm UTC](https://www.ruby-forum.com/t/10-04-ubuntu/201756/2 "2011-01-13T22:09:36Z")

</div>

I started to put a rescue wrapper around the %x{ rm /usr/bin/gem } line  
but  
hit tab out of habit and gmail sent it, so there’s an extra begin in  
there.  
Use this code only as an example!
