There’s no denying that Rails’ built-in Forms Helpers are incredibly good. However if they have one flaw, it is the way error messages from validations are handled. The default messages generated by Rails are terse to say the least! If you provide your own message (with :message=>”blah blah”, Rails automatically appends the name of the underlying field to the front of the message, which is restrictive and looks ugly.
I spent some time looking around for a good solution to this problem. I assumed it would be a simple configuration issue but it turns out the format of these messages is hard baked into the ActiveRecord::Errors.full_messages method.
Continued…
Posted in Ruby-on-Rails.
Tagged with i18n, ruby-on-rails, validation.
By martin
– September 29, 2009
I have my new Atom powered server running in the loft, now it’s time to put it to use and run some of the Rails applications I’ve been tinkering with. The following is how I installed and configured Ruby-on-Rails on Ubuntu 9.04 Server (x86 64 bit).
Continued…
Posted in Linux, Ruby-on-Rails.
Tagged with Linux, mod_rails, passenger, ruby-on-rails, ubuntu.
By martin
– August 26, 2009
Thanks again to BBC Click I have discovered a great new service on the Internet. Lefora is a free forum service that lets you create a discussion forum service for your own communities. It’s really easy to set up, customise and get started.
So why do I need a forum? Well I’ve been secretly working on my own little project and now it’s time to start getting users on board. Using Lefora has enabled me to concentrate on my own service and not waste valuable time implementing another forum. You can check out my forum at rondayvoo.lefora.com. Oh yeah, my little project is at Rondayvoo.com. Feel free to check it out and use the forum to tell me what you think!
If you want your own free forum just click on :
free forum hosting by lefora
Posted in Internet.
Tagged with BBC Click, forums, web 2.0.
By martin
– July 23, 2008
Objective:
Maintain a copy of my local Subversion repository on my hosting server ready for deployment of my application using Capistrano.
Continued…
Posted in Windows.
Tagged with putty, ssh, svn, version control.
By martin
– February 16, 2008
I am interested in how to run some code as a background process using rails. These are a few links I have collected on the subject.
- http://labnotes.org/cgi-bin/trac.cgi/wiki/Ruby/ReliableMessaging
- http://rubyforge.org/projects/backgroundrb/
- http://ap4r.rubyforge.org/wiki/wiki.pl?HomePage
- http://cleanair.highgroove.com/articles/2006/06/23/running-background-jobs
I think I’ll go with ActiveMessaging.
Posted in Linux, Ruby-on-Rails.
Tagged with ruby-on-rails.
By martin
– December 16, 2007
The root partition of my Ubuntu 704 Server Virtual Machine was only 5GB and was filling up regularly. Incresing the size is quite complex as you have to increase the size of the VMWare disk file, then increase the size of the file system partition within the disk file. Here are the steps I went through and a few hints and tips along the way.
Continued…
Posted in Linux.
Tagged with ubuntu, virtualisation, VMWare.
By martin
– October 10, 2007
I stumbled across this new web technology called JSON whilst reading about the performance features being introduced into by AJAX web development tool I use. Essentially they replaced the XML interface between the server and browser based JavaScript client with JSON. JSON is a way of expressing complex data structures which is less verbose than XML and is supported natively by JavaScript which makes it much more performant in those environments. The home of JSON on the web is www.json.org, where there is an article called “The Fat Free Alternative to XML” that does an excellent job of explaining the benefits of JSON. There are also links to JSON libraries for just about every programming language that ever existed. So the question is, will the web community now have to change the name of Ajax ?
Posted in Software.
Tagged with javascript, json, xml.
By martin
– September 19, 2007
Now I have my Gnome desktop running on my sever I’d like to be able to access it without using the vmware console. I installed vnc4server using synaptic. Under my user I type vncserver and then connect to the server using the vnc client from my Windows desktop. By default I get a plain grey X window and a basic xterm window.
Continued…
Posted in Linux.
Tagged with ubuntu, vnc.
By martin
– September 14, 2007
I installed Ubuntu Server because I wanted a minimal install befitting a server. No OpenOffice, games or any other stuff. I know my way around a unix command line but it’s just so much quicker to get things done in Windows. Now I think I’d like a light weight GUI on my server that I can start just when I need it. So I need X, Gnome, no login manager and Synaptic for package management.
I’m hoping this should work… Need to look at what’s included in gnome-core.
$ sudo aptitude install xorg gnome-core synaptic
$ startx
Posted in Linux.
Tagged with ubuntu.
By martin
– September 13, 2007
To update the local list of packages, enter in a Terminal:
sudo apt-get update
To install all available updates:
sudo apt-get upgrade
To see if package including the words blah is already installed:
dpkg -l '*blah*'
To install a package:
sudo apt-get install package
To remove a package:
sudo apt-get remove package
To list other apt commands and options:
apt-get help
Also try Aptitude for more interactive package management tool
sudo aptitude
Posted in Linux.
Tagged with apt, debian, ubuntu.
By martin
– September 8, 2007