Well, that was easy!
Ruby 1.9, Rails 2.3, and MySQL on Ubuntu 8.10 (Intrepid Ibex)
I haven’t the time to write out a big fleshy post atm, so I’ll post the short story.
I was trying to set my Ubuntu 8.10 VPS up with a fresh Ruby/Rails install to host some webapps I’m working on. Rather than apt-getting my way to glory, I decided to build Ruby 1.9.1 from source, the main reason being that the version available through apt is only 1.9.0 and I’m working with 1.9.1 on my dev machine.
After building/installing Ruby, I started installing rails, rake, rack, etc… via RubyGems. I knew that I couldn’t install the standard ‘mysql’ gem, as it hasn’t yet been updated for Ruby 1.9, so I added http://gems.github.com/ to my gem sources - if you don’t know how to do this, the command is:
gem sources -a http://gems.github.com
…and proceeded to install kwatch’s mysql-ruby gem.
To my surprise (as it had worked under OSX on my dev box), I got the following message:
plasma@syn-app01:~$ sudo gem install kwatch-mysql-ruby
Building native extensions. This could take a while...
ERROR: Error installing kwatch-mysql-ruby:
ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb
Trying to detect MySQL configuration with mysql_config command...
Succeeded to detect MySQL configuration with mysql_config command.
checking for mysql_ssl_set()... yes
checking for rb_str_set_len()... yes
checking for rb_thread_start_timer()... no
checking for mysql.h... yes
creating Makefile
make
gcc -I. -I/usr/local/include/ruby-1.9.1/i686-linux -I/usr/local/include/ruby-1.9.1/ruby/backward -I/usr/local/include/ruby-1.9.1 -I. -DHAVE_MYSQL_SSL_SET -DHAVE_RB_STR_SET_LEN -DHAVE_MYSQL_H -D_FILE_OFFSET_BITS=64 -I/usr/include/mysql -DBIG_JOINS=1 -fPIC -fPIC -O2 -g -Wall -Wno-parentheses -fPIC -o mysql.o -c mysql.c
In file included from /usr/include/stdlib.h:320,
from /usr/local/include/ruby-1.9.1/ruby/ruby.h:50,
from /usr/local/include/ruby-1.9.1/ruby.h:32,
from mysql.c:6:
/usr/include/sys/types.h:151: error: duplicate 'unsigned'
make: *** [mysql.o] Error 1
Gem files will remain installed in /usr/local/lib/ruby/gems/1.9.1/gems/kwatch-mysql-ruby-2.8.1 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.9.1/gems/kwatch-mysql-ruby-2.8.1/ext/gem_make.out
Instructions on fixing the issue and installing the gem after the jump.
Torrent-X on Windows XBMC (Atlantis)
Torrent-X is a plugin for XBMC that allows you to scan through well-known RSS torrent feeds from sites like Mininova, EZTV, etc… and pipes the torrents you choose through to your torrent client of choice via (usually) it’s web interface. Problem is, it doesn’t work OOTB with the Windows version of XBMC. Here’s how to fix it.
- Edit the shortcut to XBMC and remove the ‘-p’ from the command. This will make XBMC save user data into the installation folder, and make it accessible to scripts via the internal Q: drive. This solves the issues the script has with opening the guisettings.xml file.
- Edit the default.py file for Torrent-X and change line 1127 as follows.
Change it from:
MyDisplay = GUI( "skin.xml", ResPath , "Default" )
To:
MyDisplay = GUI( "skin.xml", os.getcwd() , "Default" )
You should then be able to open the script from within XBMC.
- NM
PS: I’ll be posting soon on the subject of my recent trip to Singapore, specifically, what a geek can do in Singapore. I’ll also be posting on how to make a cheap, feature-packed media box.
Mailarchiver 6, the Upgrade, and the Broken Next Button…
Fink Troubles - Cannot Perform Symlink Test
So, I’m trying to start developing synflare.com, using my MacBook and OSX as a development platform.
I need GD for PHP, and I can’t be screwed compiling it from source (that’s why I’ve also moved from Gentoo to Ubuntu. Binaries make life easier). Fink is a brilliant service that provides an almost ‘apt’ way of getting and installing software. With Fink, I can issue a single command in terminal and have GD install itself.
My problem, however, was that Fink wasn’t installing. At the install volume selection screen, I wasn’t able to select my root volume. It’s reasoning was: “You cannot install Fink on this volume. Cannot perform symlink test on this volume because of a permissions problem. Try performing the “Repair Disk Permissions” function in Disk Utility”.
After several Verify and Repair permissions commands, I still had no joy. I noticed that the Disk Utility log was spouting the line: “ACL present but not expected for…”. After some investigation, those lines are merely informational. As Fink still wasn’t installing, I decided to fix them by running ‘chmod -a# 0’ on the directories affected. This still didn’t help! I was at breaking point.
I decided to fix it my way (read: quick and simple).
Entering the Fink Installer Package (right-click, Show Package Contents - in Finder), I could see three scripts in the Resources folder, one of which was VolumeCheck, which basically tells the Installer if you have permissions to the Volume in question. Editing this script, I made sure it did nothing but return an exit-code of ‘0’ back to the installer.
Hey-presto, it works, and there’s no noticable issues with Fink. GD installs perfectly.
In a nutshell:
- Copy the Fink Installer Package out of the DMG and into your home folder.
- Go into the folder where you copied the package, right click on the package and click ‘Show Package Contents”
- Navigate to the Resources directory, which resides inside the Contents directory.
- Delete the existing VolumeCheck script.
- Download this file - volumecheck - and extract it into the Resources directory in the package.
- Run the installer!
If you have this problem, and this fix works for you, be sure to post a comment - I’m interested to see how many people this happens to.
- NM