After digging into the C part of ruby bindings of Mysql, I discovered that the Mysql bindings create a copy of the columns name string for each record retrieved from the database. This obviously leads to quadratic memory use and calls for correction.
Archive for the ‘ruby-mysql’ Category
After I got the mysql ruby module running, I tried out lots of small programs (some based off kitebirds tutorial) in order to try out different things.
First I ran simple.rb, which I used to test if the server is working. Works very well, easy to set up too, as the test database should already exist for you.
With quite a lot of trouble
The module is working, mysql is working, ruby is working and tk is working.
The first test is working. Hopefully these links will be useful to someone else who runs into the same problem. 🙂
Apparently there is two modules I need to install. Not one. I should have realised it. Good job I always check if the module I think I need is whats really needed.
I dislike installing too many software programs in a day, I don’t feel its real work and I want to go back to programming but of course it has to be done. Its probally the first task I’d pawn off if I had the chance.
Update: Ah I think I just need to install one. These are just the two options. So which one is better?
To use ruby with mysql, you have to use the mysql module apparently.
So to make a simple graphical program that uses a database, you need ruby software, a book on ruby, mysql software, ruby mysql module, documents of the ruby mysql module, documents on ruby/tk.
Hmm. Thats a lot when you look at it really. It should go faster every time but theres a lot of work there for the first one. Not to mention that fact it wasnt clear straight off that a ruby book didnt cover ruby/tk or ruby mysql.