valibuk.net

A place for opinions and notes of a valibuk.

Slovak Ruby and RoR fans will meet in Bratislava on April 25

Tagged with: — ondrej at 8:24 am on Thursday, April 23, 2009

Slovak Ruby and Ruby on Rails fans will meet in Bratislava on April 25, 2009. For more details see the Slovak Ruby on Rails site or directly the post about the meeting [all in Slovak].

Domain Specific Languages in Ruby

Tagged with: — ondrej at 10:09 pm on Sunday, March 22, 2009

It is probably every developer’s dream to create a programming language. It is a complex and difficult task, so it will remain just an unfulfilled dream for many.
But there is a chance to create something simpler - a domain specific language (DSL). A language, that covers a specific (and limited) domain.
Ruby helps here a lot - to create a DSL is really simple and easy.
(There is more where this came from … )

JSSh (Firefox 3.0) with Optional Port Number

Tagged with: — ondrej at 8:15 pm on Sunday, November 9, 2008

One of the ways how to remotely control Firefox is to use the JSSh (JavaScript Shell) plug-in. To successfully install the plug-in, it is necessary to find a suitable version for your Firefox version (1.x, 2.x, 3.x) and platform (Linux, Mac, Win). That is sometimes not so trivial…

Additionally there is a limitation in the plug-in: its communication port number cannot be (easily) changed, so it is not possible to start more JSSh (and Firefox) instances.

First, the actual status is described, later a new version of the JSSh plug-in is provided with examples.

(There is more where this came from … )

Rhotoalbum 0.6

Tagged with: — ondrej at 3:00 pm on Sunday, June 8, 2008

A new version of Rhotoalbum, a simple but powerful photo album generator written in Ruby, has been released.

The version 0.6 contains a lot of new features such as album statistics (number of photos, number of albums), EXIF support (exposure time, focal length, f-number and camera model), automatic album thumbnail creation from the first album photo, relative links and several bug fixes.

If you would like to know more, please, check the Rhotoalbum page.

require_gem ‘activerecord’

Tagged with: — ondrej at 1:05 am on Tuesday, March 11, 2008

A Ruby application that uses the ActiveRecord library (not a Ruby on Rails application) stopped working for me after an update of Ruby. The error message was:

  1. undefined method `require_gem’ for main:Object (NoMethodError)

The corresponding source code was:

  1. require ‘rubygems’
  2. require_gem ‘activerecord’

(There is more where this came from … )

Rhotoalbum 0.3 Released

Tagged with: — ondrej at 3:19 am on Wednesday, November 14, 2007

A new version of Rhotoalbum, a simple but powerful photo album generator written in Ruby, has been released. It is already its third release (0.3) and there are now really nice features as photo descriptions, more styles support with a style switcher or album options.

Thanks to Viktor Zigo (maybe you know his plug-in to Firefox XPather) for the most of the new features.

If you would like to know more, please, check the Rhotoalbum page. You are welcome to see our photo albums: Viktor’s or mine. Surprisingly, they are generated by Rhotoalbum ;)

Rhotoalbum

Tagged with: — ondrej at 5:02 pm on Saturday, July 14, 2007

A web photo album is already a common thing. The majority uses online web albums, where you can upload your photos, e.g. Flickr and Google’s Picasa. Also some social network portals are adding features to share photos between their users.

A much smaller group downloaded and installed a photo album application to their accounts on servers, e.g. Gallery and Coppermine. Usually they require to have a database and have a large possibilities to configure it, install plug-ins, manage photos, etc.

And then there is a special category — photo album generators. They are much simpler, usually do not use any database, but you have to regenerate your albums when you change your photos or you add a new photo.

(There is more where this came from … )

Ruby, DRb and Gentoo

Tagged with: — ondrej at 5:36 pm on Friday, October 27, 2006

Larry the CowThere can be a problem with the DRb system in Ruby on Gentoo and the IPv6 support.

If an application with DRb does not work and its error message is:

  1. Exception `SocketError’ at /usr/lib/ruby/1.8/drb/drb.rb:840 - getnameinfo: ai_family not supported
  2. /usr/lib/ruby/1.8/drb/drb.rb:840:in `getaddrinfo’: getnameinfo: ai_family not supported (SocketError)

then it is necessary to re-compile the ruby package with the ipv6 support, even you did not compile the IPv6 support into your kernel (or it is compiled as a module but it is not loaded).
(There is more where this came from … )

Distributed Ruby

Tagged with: — ondrej at 5:26 pm on Friday, October 27, 2006

I am creating a prototype of a distributed application written in Ruby. Ruby 1.8 already contains the DRb framework, as a system for a communication of different Ruby processes, and the Rinda system too, as a naming service.
(There is more where this came from … )