I’ve been trying to install Websphere Integration Developer 6.2 on Ubuntu 10.10 and have found a couple of tricks to get this going.

Install libstdc++5

1
sudo apt-get install libstdc++5

Increase open files limit

You need to edit /etc/security/limits.conf and increase the limit by adding the following:

1
*  hard  nofile  10240

Switch /bin/sh to point to /bin/bash

Out of the box, Ubuntu 10 uses the dash shell and this causes an error when trying to generateKeysForSingleProfile (according to the logs?!).

Fix this by recreating the /bin/sh symlink to point to /bin/bash

1
2
sudo unlink /bin/sh
sudo ln -s /bin/bash /bin/sh

Now when you run sudo launchpad.sh to install, everything should just work.

Running WID for the first time

We’re still not quite there as launching WID will present you with an error which shows up in the specified log as:

1
!MESSAGE Widget disposed too early!

To fix this we follow IBM’s instructions and edit the /opt/IBM/WID62/eclipse.ini file and add the following:

1
-Dorg.eclipse.swt.browser.XULRunnerPath=/usr/bin/xulrunner

Fixing the internal browser

You should find WID will launch but the welcome screen will inform you that your default system browser is not supported. No problem, it gives you instructions on how to proceed which I’ll include here for ease:

1. Download a precompiled version of the Mozilla browser from the following site: http://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.7.12/contrib/mozilla-i686-pc- linux-gnu-1.7.12gtk2+xft.tar.gz

If this link does not work, look for a Linux (x86) for GTK2 and Xft build from the following site: http://www.mozilla.org/releases/

2. Extract this file to a location on your workstation, for example, as /opt/mozilla-1.7.12-gtk2+xft.

3. Log in as the root user or become the root user by issuing the su command.

4. Open a command prompt and run the following commands:

1
cd /opt/mozilla-1.7.12-gtk2+xft/plugins tar xvfz install_flash_player_9_linux.tar.gz mv install_flash_player_9_linux/flashplayer.xpt . mv install_flash_player_9_linux/libflashplayer.so .

Optional:

1
rm -rf install_flash_player_9_linux

5. Log out as the root user.

6. From a command prompt, run the following commands:

1
2
cd /opt/mozilla-1.7.12-gtk2+xft
./mozilla

7. Exit WebSphere Integration Developer and restart it with the same workspace directory.

8. Update your .profile file to set these environment variables at the user level. In order for this to take effect you will need to logout and login again.

1
2
export MOZILLA_FIVE_HOME=/opt/mozilla-1.7.12-gtk2+xft 
export LD_LIBRARY_PATH=$LD_LIBRARY:/opt/mozilla-1.7.12-gtk2+xft

Removing the reference to xulrunner

Now we’ve changed the internal browser we need to remove the reference to xulrunner which we used previously to get WID started. Otherwise WID will try to use xulrunner as its default browser and ignore our environment variable.

So go back to the /opt/IBM/WID62/eclipse.ini file and remove the last line that we put on there.

Hopefully, fingers crossed, WID should now start without a hitch.

I’ve been setting up a new MacBook Pro using rvm and gemsets to make it super easy to flick between different versions of rails and ruby (thanks Steve for this very useful post). I was aware that MySQL could be a problem if you get your architectures wrong so it’s important to download the 64 bit version of MySQL and that your ruby is also 64 bit. You can check that by using the following commands:

1
2
file `which ruby`
file `which mysql`

I was seeing x86_64 for both so everything was good.

I had already created a rails2.3.8 gemset using rvm and was ready to install the rails and mysql gems:

1
2
gem rails install -v 2.3.8
ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

However I was getting several errors. First off I couldn’t run the rails command because of this error:

1
uninitialized constant ActiveSupport::Dependencies::Mutex (NameError)

And I couldn’t run my app because of this error in the passenger log:

1
uninitialized constant MysqlCompat::MysqlRes

Fixing rails

Lets start with the rails command error. Turns out theres an incompatibility between rails 2.3.8 and recent versions of rubygems. The suggested fix is to upgrade to rails 2.3.11.

1
2
gem uninstall rails
gem install rails -v 2.3.11

Obviously you’ll now need to go into your application and change your environment.rb to use 2.3.11…

1
2
# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '2.3.11' unless defined? RAILS_GEM_VERSION

And tells rails to update your application…

1
rake rails:update

Once that’s done the first problem is fixed.

Fixing MySQL

I was still getting the MySQL error unfortunately. If you google the error you’ll get all sorts of explanations on how important getting the 64 bit architecture correct is when compiling the mysql gem. Well I’d done that!

I figured out the solution to my problem whilst checking out a ruby forum post on the issue. Some people on there were using symlinks to fix the issue but if you add your MySQL lib directory to your DYLD_LIBRARY_PATH then the problems go away. I’ve already been tinkering with my DYLD_LIBRARY_PATH as this environment variable is used for the Oracle instant client. So I simply opened up my .bash_profile and added the lib directory for MySQL:

1
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib

And now everything works. I’ve got no idea why it was needed and I’m not sure why a small minority of people need this fix whereas most don’t, but there it is.