我正在使用Sinatra的DataMapper gem并遵循以下教程:
http://net.tutsplus.com/tutorials/ruby/ruby-for-newbies-working-with-datamapper/
原文链接:https://www.f2er.com/sqlite/453035.htmlhttp://net.tutsplus.com/tutorials/ruby/ruby-for-newbies-working-with-datamapper/
我正在连接到数据库并进行以下迁移:
DataMapper.setup :default,"sqlite://#{Dir.pwd}/ex2.db" DataMapper.auto_migrate!
我的数据模型:
class User include DataMapper::Resource property :id,Serial property :username,String property :email,String end
我正在使用此命令执行:
rackup config.ru
但是,当我到达这一行时:
User.create username: "JoeSchmo",email: "joe@schmo.com"
我收到错误:
Rack::Lint::LintError: Status must be >=100 seen as integer
知道为什么会这样吗?