freaking code code code … I wish I knew what I was doing wrong ?

2Nov/093

Adobe log format vs. Limelight Flash Log Format

For my information: the limelight flash log file format is almost the same as the flash media player 3.5 log format (the last fields have no equivalence in the LUX log format.) for the adobe log format see: link

after the break there is a full table and I've added a zero-based index number (easier to parse the logs). as a final note: the LUX log is tab delimited so its easy to split it :-)

31Oct/091

ruby and mysql on OSX 10.6

here are some note on installing ruby on OSX ... as usual this probably will not work for anyone and these are just some notes on mistakes I made:

  • I used the installed version of ruby on OSX 10.6 - Snow Leopard
  • Install the 64 bit version of MySQL from the mysql site (link - and selec the x_86_64, I've used the 5.1.40 installation)
  • install ruby dbi module (dbi-0.4.3) : sudo gem install dbi
  • install ruby dbd module (dbd-mysql-0.4.3):  sudo gem install dbd-mysql

I've also installed mysql (mysql-2.8.1) (though I don't think you need it with DBI/DBO described above). this is the command line I used to install it:

sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

note: the mistake I made earlier was to not use the "x86_64" parameter and I (I think) as a result for the following error message :`load_driver': Could not load driver (uninitialized constant MysqlError) (DBI::InterfaceError)

So after this I was able to execute the simple DB queries via the ruby dbi interface:

begin
    # connect to the MySQL server
    dbh = DBI.connect("DBI:Mysql:#{$DB}:#{$DB_SERVER}", $DB_USER, $DB_PW)
    # get server version string and display it
    row = dbh.select_one("SELECT VERSION()")
    puts "Server version: " + row[0]
rescue DBI::DatabaseError => e
    puts "An error occurred"
    puts "Error code: #{e.err}"
    puts "Error message: #{e.errstr}"
ensure
    # disconnect from server
    dbh.disconnect if dbh
end