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 }
on 2011-01-13 22:07
on 2011-01-13 22:09
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!
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.