July 2009
Another word of warning about Ruby On Rails 2.3
Submitted by mmorsi on Thu, 2009-07-30 15:50I'm not sure if this was introduced in 2.3 or a prior version but today several of us working on the oVirt project discovered that Rails is now _requiring_ i18n localization translations for alot of stuff, namely the activerecord model validation errors.
Though i18n is a great feature, we have no time to write lots of translations right now, and we're still looking into how to turn this off (if even possible, I will update this post with the final solution when we find it).
IMHO the rails guys really shot themselves in the foot with this one. Even if it can be turned off, it shouldn't be turned on by default as its an extra feature than many people don't need and currently causes major breakage.
If you are a developer working on rails, make sure to look out for this when upgrading your rails instance (honestly I would wait, there seems to be many new 'features' causing issues and breakage).
</rant>
- mmorsi's blog
- Login to post comments
- Read more
jQuery Dump Plugin
Submitted by mmorsi on Wed, 2009-07-29 18:41For some reason I've always found dumping objects to see their contents and methods in javascript a pain. Today I found this very useful jQuery plugin that provides the most complete / robust dump functionality with the best output I've seen. You can d/l it from here (save it as jquery.dump.js, sometimes drupal mangles filenames for security) and after including it in your html, simply invoke $.dump(whatever_javascript_object).
Here are a couple of quick screenshots I took of the output, note there is alot more, I just grabbed the beginning of the attributes and functions sections.
- mmorsi's blog
- Login to post comments
- Read more
Word of warning about rails 2.3
Submitted by mmorsi on Tue, 2009-07-28 21:36Rails in Fedora was upgraded to 2.3 in F11. When working on oVirt today, I discovered that changes to my templates were not being served to the user until I restarted mongrel/rails. Quickly searching around for the issue, I stumbled upon the Rails 2.3 changelog, particularly this section which states:
In most cases, you’ll want template caching to be turned on in production, which you can do by making a setting in your production.rb file:
config.action_view.cache_template_loading = true
This line will be generated for you by default in a new Rails 2.3 application.
While this is an excellent default for production systems, for development this is undesired (eg you'll need to restart mongrel every time you make a template change no matter how small), and thus adding the following to config/environment.rb resolves the issue (preferably you'll just enable in in your dev environment, but I didn't really care as this is on my dev box)
config.action_view.cache_template_loading = false
- mmorsi's blog
- Login to post comments
- Read more
Announcing Romic Version 0.1!
Submitted by mmorsi on Sat, 2009-07-25 23:17With over a year in the making (along w/ a few other projects to be released in the near future) I am releasing romic, Relational Object Mapping In C++ (via sourceforge). This AGPL/linker-friendly library provides the ability to seamlessly map database tables and rows to C++ classes and objects and use those table classes to CRUD data and perform other database operations. To assist in generating the boilerplate code a simple C++ source to source converter executable is provided as part of the project which reads in regular C++ source files with romic db macros, replacing them with the corresponding table registration code.
There really isn't much to say here other than whats on the project page and in the manual. This project is a spin off of a much larger project I'm still working on, and expect to be for a long time. I will continue to develop romic, there are quite a few TODOs/FIXMEs, and have a couple other projects to be released in the near future. Until then enjoy!
- mmorsi's blog
- Login to post comments
- Read more
ovirt-viewer srpm and spec
Submitted by mmorsi on Thu, 2009-07-23 21:09Attached is a spec and srpm which I am initially hosting in hopes to get the ovirt-viewer rpm into Fedora for work.
- mmorsi's blog
- Login to post comments
- Read more
Installing a perl module
Submitted by mmorsi on Fri, 2009-07-17 16:06Here's a nifty tip, if you have a perl script that depends on a module, for example:
"use Text::Smart::Plugin;"
you can easily install it via
"yum install 'perl(Text::Smart::Plugin)"
without having to try to find the exact package (although it will be named perl-Text-Smart-Plugin)
- mmorsi's blog
- Login to post comments
- Read more







