Here is my implementation of a forking supervisor daemon in ruby.
pre { font-size:10px; }
Here is my implementation of a forking supervisor daemon in ruby.
pre { font-size:10px; }
Tags: ruby
In Rails, update_attribute method bypasses model validations, while update_attributes and update_attributes! will fail (return false or raise an exception, respectively) if a record you are trying to save is not valid.
This means that if at certain point during the project you adjust validations such that some records that used to be valid are now invalid, [...]
Tags: ruby
If I select “field as alt_field_name”, the value will always come out as String, not what the field actually is.
>> User.find(:first, :select => :created_at).created_at
=> Wed Jan 24 00:04:59 UTC 2007
>> User.find(:first, :select => "created_at").created_at
=> Wed Jan 24 00:04:59 UTC 2007
>> User.find(:first, :select => "created_at as created__at").created__at
=> "2007-01-24 00:04:59"
Tags: ruby
In this post I would like to show how one can exchange messages using AMQP protocol from Ruby, using RabbitMQ as a broker. I posted the original version of this script to rabbitmq-discuss mailing list back in September 2007.
Prerequesites:
RabbitMQ broker configured, up and running on 127.0.0.1 (localhost) on port 5672 (standard AMQP port).
Apache QPid Ruby [...]
Starting today, Elastic Server On Demand allows you to select Phusion Passenger (mod_rails for Apache) as a web container for your Rails 2 application. This allows you to deploy a Rails app on Apache, the world’s most popular web server. Check it out at http://es.cohesiveft.com/site/rails2.