Created
April 28, 2011 13:38
-
-
Save PetrKaleta/946362 to your computer and use it in GitHub Desktop.
Sequel error in macruby
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
irb(main):001:0> require 'rubygems' | |
=> true | |
irb(main):002:0> require 'sequel' | |
=> true | |
irb(main):003:0> DB = Sequel.sqlite | |
=> #<Sequel::SQLite::Database: "sqlite:/"> | |
irb(main):004:0> DB.create_table :items do | |
irb(main):005:1> primary_key :id | |
irb(main):006:1> String :title | |
irb(main):007:0> end | |
=> nil | |
irb(main):008:0> class Item < Sequel::Model | |
irb(main):009:0> end | |
=> nil | |
irb(main):010:0> item = Item.new | |
NameError: undefined local variable or method `model' for #<Item:0x200427d60> | |
/Library/Frameworks/MacRuby.framework/Versions/0.10/usr/lib/ruby/Gems/1.9.2/gems/sequel-3.22.0/lib/sequel/model/base.rb:1378:in `set_restricted:' | |
/Library/Frameworks/MacRuby.framework/Versions/0.10/usr/lib/ruby/Gems/1.9.2/gems/sequel-3.22.0/lib/sequel/model/base.rb:1064:in `set:' | |
/Library/Frameworks/MacRuby.framework/Versions/0.10/usr/lib/ruby/Gems/1.9.2/gems/sequel-3.22.0/lib/sequel/model/base.rb:753:in `initialize' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment