I use the DataMapper gem with Sinatra and follow the instructions here:
http://net.tutsplus.com/tutorials/ruby/ruby-for-newbies-working-with-datamapper/
I connect to the database and migrate as such:
DataMapper.setup :default, "sqlite://#{Dir.pwd}/ex2.db"
DataMapper.auto_migrate!
My data model:
class User
include DataMapper::Resource
property :id , Serial
property :username , String
property :email , String
end
I execute this command:
rackup config.ru
However, when I get to this line:
User.create username: "JoeSchmo", email: "joe@schmo.com"
I get an error message:
Rack::Lint::LintError: Status must be >=100 seen as integer
Any idea why this is happening?
source
share