[Nitro] problems with require on Debian Sarge

Bakki Kudva bakki.kudva at gmail.com
Sun Feb 19 23:17:44 EST 2006


I was having trouble with require 'nitro' until I added
RUBYOPT=rubygems to my env.
Now I am following along with the video samples from the web site and
everything was fine until I got to Og. Now I get...
./model.rb:11: uninitialized constant Og::Database (NameError)
        from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in
        from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in
        from demo.rb:4
which is the require 'model' line.

I am trying to use pgsql and have added ..
db = Og::Database.new(
  :database => 'mydb',
  :adapter  => 'psql',
  :user     => 'bakki',
  :password => ''

It's late and I am not seeing straight...so thought I'd shoot this one
at the list.
Thanks in advance for helping.


PS: Which is the best place for the db config code? In the demo.rb or
the model? Can you have different models which connect to different

More information about the Nitro-general mailing list