On Monday, April 6, 2015 at 7:42:27 AM UTC-7, Erik Griffin wrote: > > Hi, I would very much like to begin using Sequel, but I am having some > trouble getting it to work. > > I wanted to make a basic model and run some Rspec tests. > > I have a user.rb file which looks like this: > > require 'sequel' > > class User < Sequel::Model > > primary_key :id > String :name >
You appear to be trying to use Database schema modification methods inside a model. Don't do that. Sequel will introspect your database to get the information for the model. If you want to modify the database to add a table for the model, it's best to use migrations. See: http://sequel.jeremyevans.net/rdoc/files/doc/schema_modification_rdoc.html http://sequel.jeremyevans.net/rdoc/files/doc/migration_rdoc.html Thanks, Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sequel-talk. For more options, visit https://groups.google.com/d/optout.
