Without this declaration or an attr_accessor,
the has_many class method would not exist.
??? The process of finding Og models relies on ObjectSpace. ObjectSpace implementation
greatly complicates Ruby interpreter implementation; on platforms with
managed garbage collection such as the .NET CLR or Java, it takes some special
??”and comparatively slow??”implementation techniques. Because of this, it is
possible that some of the Ruby 1.9 virtual machines may have limited or no support
for ObjectSpace.
We will now see a highly experimental method of using Og with Rails. This method
works around most of the incompatibilities between Nitro and Rails.
Installing Og from source. Unfortunately, the current stable gem version of Og (0.41.0)
does not work with Rails. We will download the latest version of the code with
Darcs and build a gem ourselves.
Darcs is a distributed version control system written in Haskell. It is
available from http://darcs.net/. If you have a working installation of GHC
(the Glasgow Haskell Compiler), you can install Darcs from source. Otherwise,
there are Darcs binaries available for many platforms.
First, we get the latest Nitro code using Darcs:
$ darcs get --partial http://repo.nitroproject.org nitroproject
$ cd nitroproject
Next, we find out what version of Ruby Facets this version of Nitro requires and
install it. The dependency is contained within the gem specification for Glue:*
$ grep facets glue/glue.
Pages:
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421