published on 21.07.2008 00:19.

loading data from mysql into couchdb with rest and ActiveRecord

$KCODE = 'u'

require 'rubygems'
require_gem 'activerecord'
require 'rest_client'

class MyModel < ActiveRecord::Base
end

ActiveRecord::Base.establish_connection(
  :adapter => "mysql", 
  :database => "hello_world", 
  :encoding => 'UTF8'
)

MyModel.find(:all).each do |record|
  p RestClient.post('http://localhost:5984/hello_world', record.to_json)
end

Posted in ,  | Tags , , , , ,  | no comments | no trackbacks

published on 13.07.2008 16:17.

perl needs no obfusciation ...

interestingly, you can be just as obscure in ruby.

Posted in  | Tags  | no comments | no trackbacks

published on 12.07.2008 22:28.

Too bad Zed left ...

»When the burning husks of your startups warm
the last of your bones, remember I told you so.«

— Zed, in Rails is a Ghetto

Posted in ,  | no comments | no trackbacks