db[:users]
gives you an Sequel::SQLite::Dataset
. users.first
method without any argument gives you a user as Hash
object. Now you are calling Hash#delete
, which required a argument. But you are not passing it that argument. Thus it is complaining.
Rather do as below :
# if you want to delete the the first matching argument of any specific
# attribute/db column
db[:users].filter(:key => 1).delete
# or if you want to delete the first record from db
db[:users].limit(1).delete
Read this #drop
method also.