valibuk.net

A place for opinions and notes of a valibuk.

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.  

(There is more where this came from … )

Updating from Categories to Tags in WordPress

Tagged with: — ondrej at 12:47 am on Wednesday, November 28, 2007

I updated my WordPress installation to the version 2.3.x and found a new feature: tags.
I converted all my categories to tags (except the Uncategorized category) and… what I saw a small disaster :) All categories disappeared (an expected result), but the categories list in my sidebar contained only one, not very useful, item Uncategorized. Additionally a blog entry contained only Filed under: Uncategorized, again, not very helpful.

And then I realised – I have my own theme… arrrrgh…. and there is no tags to categories converter ;>
Well, here are steps how to update your own theme to support basic tags features:
(There is more where this came from … )

Ostrava on Rails – Moja Prezentácia

Tagged with: — ondrej at 9:31 pm on Sunday, June 24, 2007

Téma lokalizácie a viacerých jazykov nepatrí medzi najzaujímavejšie :), hoc je potrebná v naších podmienkach lebo:

  • RoR je len a len po anglicky
  • naše trhy su malé – pre získanie viacerých zákaznikov treba prekročiť jazykové “hranice”

Prezentáciu som snažil vytvoriť ako manuál – na čo treba myslieť a čo treba spraviť. Súčasťou boli ukážky (ktoré väčšinou aj fungovali :).

Sľúbená prezentácia (OpenOffice, PDF) a ukážky: Simple SlovakRails (.zip, .tar.bz2), Gibberish (.zip, .tar.bz2) a Ruby-GetText (.zip, .tar.bz2).

P.S.
Samozrejme, koľko ľudí, toľko chutí – objavila sa kritika i pozitívny ohlas. Ďakujem za oboje. Kritikov len poprosim byť konkrétnejšími, lebo povedať len, bolo to zlé, nerobi dobré ani jednej strane – kritik sa prezentuje ako nedozretý a kritizovaný si z toho nič neodnesie.

Duplikovanie tém: Globalize – Saimon Moore v piatok. Áno, vedel som o tom. I organizátori boli upovedomení, ale dohodli sme sa na zaradení mojej prezentácie. Keďže táto problematika je dôležitá v našich končinách, nebolo zbytočné dozvedieť sa i o iných možnostiach – najmä keď ide o tak rozdielne riešenia ako Ruby-GetText a Gibberish.

Ostrava on Rails – Sobota

Tagged with: — ondrej at 9:11 pm on Sunday, June 24, 2007

Ruby on Rails Cesta na Ostravu prebehla hladko, a keďže som sa vyhýbal plateným cestám v Čechách :), dostal som sa do malebnej časti medzi Frídkom-Místkom a Ostravou (išiel som cez Makov). Pekné miesta :)

Žiaľ piatkového programu som sa nemohol zúčastniť (podľa slov ostatných bol zaujímavý a kvalitný), takže len pár slov o sobote: (pre mňa) najzaujímavejšia i najlepšia prezentácia bola Ruby On Rails deployment – Jiří Kubíček. Trošku som sa zľakol, keď do 20 minútového okna prišla cca 50 stránková prezentácia Představení technologie ROR – Robert Cigán, ale nakoniec sa prezentácie pekne preusporiadali a všetko sa stíhalo.

Očakávaným efektom bolo nadväzovanie kontaktov – získal som pár mien a kontaktov priamo na konferencii, ďalší dnes – a dúfam, že sa podarí úspešne vytvoriť prezentovaný zámer vybudovať komunitu.

Organizátori nás zvládali úspešne – ďakujem za usporiadanie. A samozrejme za obed a vynikajúci koláčik. Mňam :)

Ostrava On Rails – Talk / Prezentácia

Tagged with: — ondrej at 1:31 am on Saturday, June 23, 2007

Ruby on Rails I will give a talk about localisation (localization, l10n) and internationalisation (internationalization, i18n) in Ruby on Rails applications on the Ostrava on Rails conference on 23. June in Ostrava, Czech republic. I am looking forward to meet you there :)

Slides and examples will be available here after the conference, probably on Sunday.

Budem mať prednášku o lokalizácii (aby to pekne po našom :) a internacionalizácii (či podpore viacerých jazykov) v Ruby on Rails aplikáciách na konferencii Ostrava on Rails, ktorá sa koná 23. júna v Ostrave. Teším sa na stretnutie…

Prezentácia a príklady budú prístupné po konferencii, pravdepodobne v nedeľu.

O pár hodín vstávam aby som stihol byť v Ostrave ráno…

Screencast On Linux

Tagged with: — ondrej at 4:51 pm on Saturday, May 19, 2007

The Ruby on Rails community has an interesting motto: Show, don’t tell. It is really worth to follow this idea, especially for tutorials or application pages. I usually look for links as Screenshots, Screencast or Demo on such pages — firstly you would like to see what a photo gallery looks like and then you will read instructions how to install it or how to change the background colour…

One of the mentioned presentations is a screencast. (Shortly: A record of everything what happened on your desktop (or its part) — window changes, keystrokes and mouse movements.)

How to create a screencast on Linux? There are applications such as xvidcap, vnc2swf, Istanbul and recordMyDesktop.

(There is more where this came from … )

Ostrava On Rails

Tagged with: — ondrej at 9:27 pm on Monday, May 14, 2007

Ruby on Rails With a great pleasure I read about a Ruby On Rails conference in Ostrava, Czech Republic on 22 – 23 June. Time permitted, I would like to be there. Well, at last something is happening, although we still do not have meetings of Ruby on Rails fans in every bigger city :)

S potešením som sa dozvedel o Ruby On Rails konferencii v Ostrave, ktorá sa koná 22 a 23 júna. Dúfam, že sa mi podarí nájsť si čas a zájdem tam. Konečne sa niečo deje, hoc máme ešte stále ďaleko od zrazov RubyOnRails-istov v každom väčšom meste :)


Ostrava on Rails

P.S.
Keď tak premýšlam, bol by záujem o niečo také v Bratislave?

Sound Recording With Intel High Definition Audio On Dell Latitude D820 & Gentoo

Tagged with: — ondrej at 1:08 pm on Friday, March 23, 2007

Larry the CowThe Dell latitude D820 notebook with the Intel High Definition Audio sound card (snd_hda_intel) has only one jack for microphone and line in inputs. The outcome of this feature was, that only the internal microphone input worked on Linux :)

It was a problem for a longer time, there was a possibility improve — to set the position_fix option, but it never worked for me.

Fortunately, I found an excellent guideline for Debian, where this problem is solved :) Let’s adopt the instructions for Gentoo.

(There is more where this came from … )

Chumby

Tagged with: — ondrej at 1:42 pm on Saturday, March 10, 2007

I would like to have this thing, indeed. It is cute, handsome, perfect, …, you can change its cover…. it can be your alarm… with a nice mp3 ogg… it can display slashdot or digg entries or google calendar events.. it can show photos from flicker… etc.

And it is open! You can extend or change it functionality. I mean no h4cking.. you are supported to do so :) Btw. it runs on Linux :) (I do not know more details.) The company behind it chosen a different strategy then big players in this segment: Philips, Apple or mobile phone producers as Nokia.

Unfortunately, you cannot buy it now — should be available in spring 2007 (although on same pages you can find information about beginning of this year). I keep my fingers crossed :)

A few links:
http://www.chumby.com/corporate
http://chumby.wordpress.com/
http://www.flickr.com/photos/33515138@N00/
(There is more where this came from … )

Generating PDF With Another Encoding

Tagged with: — ondrej at 12:42 am on Thursday, March 8, 2007

Ruby on Rails A PDF document is a favourite way how to display and store a view on data, sometimes called as a report. Of course, your Ruby On Rails application can display data in a very nice form, but definitively a PDF document is a way how to store a report. Actually, it is one of the most wanted ways.

There is a nice page How to Generate PDF in Ruby on Rails that describes different frameworks for generating a PDF document in RoR.

Everything seems be fine, shiny… But did you try to generate PDF with a different encoding then ISO-8859-1? Well, maybe you know, maybe not, but there are also another languages and some of them use also special small funny waves or lines under or above (sometimes also on the sides of) a letter. Experts may call them acute, wedge or umlaut. But in the computer world, we can simply call them: complications.

So, are you a lucky person that should to put to a report words like čučoriedka?
(There is more where this came from … )

« Previous PageNext Page »