Is it possible to print error message near the inputbox and not all on top of the page by <%= error_messages_for 'users' %>
Yes and no. error_messages_for won't do it, but you have to realise that error_messages_for is just a way of doing errors, this nothing wrong with rolling your own thing (there's very little code in error_messages_for). You might be interested in error_message_on which gets you the error messages for a single attribute.
Fred