[Nitro] help - stuck on basics again

itsme213 itsme213 at hotmail.com
Fri Jun 30 13:30:35 EDT 2006


I am getting errors with very basic usage.

A simple model:
===============
class T
  property :name, String

  has_many :attributes, A

  def to_s
    @name
  end
end

class A
 property :name, String
 belongs_to :owner, T
end

class I
  property :name, String
  belongs_to :type, T

  def to_s
    @name
  end
end

class S
 property :name, String
 property :value, String
 belongs_to :owner, T
end

A simple run:
=============
#!/usr/bin/env ruby

require 'nitro'
require 'og'

require 'src/domains.rb'
require 'part/admin'

include Nitro

Og.setup(
  :store => :sqlite,
  :base_dir => 'dashboard'
  )

Nitro.run


I go to /admin and try to create a new T, and I get:

=========


 In file 'c:/ruby/lib/ruby/gems/1.8/gems/og-0.30.0.1/lib/og/store/sql.rb' :


954: # :section: Misc methods.
955:
956: def handle_sql_exception(ex, sql = nil)
957: Logger.error "DB error #{ex}, [#{sql}]"
958: Logger.error ex.backtrace.join("\n")
959: raise StoreException.new(ex, sql) if Og.raise_store_exceptions
960:
961: # FIXME: should return :error or something.
962: return nil
963: end
964:


I'm using the 0.30.0.1 from ~bryan.

Many thanks.





More information about the Nitro-general mailing list