Rack :: Lint :: LintError: the status must be> = 100, as a whole

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?

+5
source share
3 answers

Try deleting SQLite DB - it seems that there is an error in data_mapper with changing the data structure and using old data. For me, the error disappeared after removing db and creating a new one.

+3
source

, 1,9, => : , .

User.create :username => "JoeSchmo", :email => "joe@schmo.com"
+1

I had the same problem with Sinatra and datamapper. Creating my records with a “new” keyword, rather than “creating”, and then adding attributes one after another worked for me. I hope you find this helpful.

0
source

All Articles