-
2011-04-11
"I am experimenting with Mongoid and embedded relations. I have a class A that can have three named 1..1 relations to class B, and I found it quite problematic to get the reverse relationship setup. After specifying class_name and inverse_of everything started working as expected.
class B include Mongoid::Document embedded_in :a, class_name: "A" end class A include Mongoid::Document embeds_one :something, class_name: "B", inverse_of: :a embeds_one :completely class_name: "B", inverse_of: :a embeds_one :different, class_name: "B", inverse_of: :a end "
-
2008-03-06
"Yesterday I twittered that I was trying to find a version of Ruby that both cc.rb and Rails likes. Last night, Wordpress plugin Twittertools posted yesterdays twitters to this blog. And this morning, I have an answer from Alexey Verkhovsky what the good versions are. Gotta love the lazyweb."
-
2008-02-16
"I am creating a small site using Merb, DataMapper and RSpec, all in all a very enjoyable experience. I did however have problem getting the test database to be automigrated when running the specs, as I am used to in Rails.
As Google did not help, I turned to #merb on IRC, and got immediate help.
Two alternatives:
Run rake MERB_ENV=test dm:db:automigrate before running rake specs Insert DataMapper::Base.auto_migrate! into your spec/spec_helper."
-
2008-01-17
"I cannot help myself from making a small comment on Rick Hightowers post on Groovy vs JRuby. In short he thinks Sun should support Groovy instead og JRuby, because the syntax is familiar to Java programmers.
To support his case he presents a chart showing language popularity according to job postings. And since Ruby is at the bottom and Java is on the top, Sun should support Groovy. Which by the way is not even on the chart."
-
2007-12-17
"I just read the following in a month old post on the RSpec list:
As someone who uses an IDE, I find dealing with multiple SCMs is a real pain, and one of the cool things about Ruby has been that (traditionally) nearly everything’s in Subversion
It might be that Rails will have hard time keeping up with new stuff, both technically and culturally, since it tied really close knots with everything that was cool 2005."
-
2007-12-14
"RSpec 1.1: “The RSpec Development Team is pleased as glug (that’s kind of like punch, but more festive) to announce RSpec-1.1.0.”
Woohoo! We’ve used RSpec since the 0.7-ies and I personally could not be happier with it. The RSpec community is really pushing the boundaries for testing/speccing frameworks and is now the standard for all others to follow.
(Via David Chelimsky)"
-
2007-12-13
"I was happy to note that Dion Almaer commented on my blog post on Merb. Dion is one of my favorite bloggers/podcasters and I value what he writes highly.
But I disagree with him on this one. The problem with using Java for web application development was never one of too much choice. In fact, it was because of that choice that Java became a player in the server side market at all."
-
2007-11-12
"I have had problems compiling Vim on Leopard, and it turns out that the culprit is the built in Mac Ruby. No clue why, but when after port installing Ruby, Vim installs cleanly.
I guess I’ll have to go with MacPorts Ruby - having a working Vim beats DTrace, however cool it is."
-
2007-06-27
"This tutorial on RubyOSA is great. I have never got around to learn AppleScript, and now it seems like I never will."
-
2007-05-14
"I am using Ruby based DSL’s for a number of tasks in my current project. But one day it struck me - am I using the right tool for the job, could there be a better, more simple solution?
Some DSL’s I use are simply declarative and look something like this:
quiz "Let's ask stuff" do question "What is 1+1?" do alternative "2", :correct => true alternative "3" end question "Vad is 2+3" do alternative "1" alternative "Infinity" alternative "Don't know" alternative "5", :correct => true end end I find that quite readable, but it requires me to maintain code that handle the DSL."