Prev | Current Page 410 | Next

Brad Ediger

"Advanced Rails"

gemspec
s.add_dependency("facets", "= 1.8.54")
$ sudo gem install facets --version =1.8.54
* Glue is Nitro??™s library that ties all of the components together, similar to ActiveSupport and RailTies in Rails.
Replacing Rails Components | 277
Then we can build the Glue and Og (and, optionally, Raw and Nitro) libraries into
gems and install them:
$ cd glue/
$ gem build glue.gemspec
$ sudo gem install glue-0.50.0.gem
$ cd ../og/
$ gem build og.gemspec
$ sudo gem install og-0.50.0.gem
$ cd ../raw/
$ gem build raw.gemspec
$ sudo gem install raw-0.50.0.gem
$ cd ../nitro/
$ gem build nitro.gemspec
$ sudo gem install nitro-0.50.0.gem
To update the beta gem to the latest source, you can later run darcs
pull from the nitroproject directory. Then recheck the Facets dependency,
and run the preceding code again to rebuild and reinstall the
latest gems.
Verify that the Og gem is correctly installed:
$ gem list --local og
*** LOCAL GEMS ***
og (0.50.0)
State of the art object-relational mapping system
Using Og with Rails. We will use a custom Rails initializer to load Og and work around
a few of its Rails incompatibilities. All Ruby files in config/initializers are loaded automatically
on Rails startup, so this is a perfect place to start Og. Here is the initializer:
config/initializers/og.rb
# 1. Require our custom edge version of Og
gem 'og', '=0.50.0'
# 2.


Pages:
398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422