# Resurrecting Sinatra-Rom

**URL:** <https://discourse.rom-rb.org/t/resurrecting-sinatra-rom/590>\
**Category:** Issues\
**Created:** [January 30, 2023, 7:37pm UTC](https://discourse.rom-rb.org/t/resurrecting-sinatra-rom/590 "2023-01-30T19:37:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mslinn](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.rom-rb.org/mslinn/32/288_2.png) [@mslinn](https://discourse.rom-rb.org/u/mslinn)\
**Post date:** [January 30, 2023, 7:37pm UTC](https://discourse.rom-rb.org/t/resurrecting-sinatra-rom/590/1 "2023-01-30T19:37:41Z")

</div>

I am learning Sinatra and Rom. I forked the dusty [sinatra-rom project](https://github.com/mslinn/sinatra-rom) on GitHub.

I run the program with `bundle exec rackup`.

I am working through the issues. This one has me stumped:

[`db/commands/products/create.rb`](https://github.com/mslinn/sinatra-rom/blob/master/db/commands/products/create.rb) throws `undefined method relation for CreateProduct:Class (NoMethodError) relation :products`

Here is the start of that file:

```auto
class CreateProduct < ROM::SQL::Commands::Create[:sql]
  relation :products
  register_as :create
...

```

Both the `relation` and the `register_as` commands are not recognized.

---

<div class="post-metadata">

**Author:** ![wuarmin](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.rom-rb.org/wuarmin/32/233_2.png) [@wuarmin](https://discourse.rom-rb.org/u/wuarmin)\
**Post date:** [February 22, 2023, 9:15am UTC](https://discourse.rom-rb.org/t/resurrecting-sinatra-rom/590/2 "2023-02-22T09:15:36Z")

</div>

Hey @mslinn,  
sinatra-rom is very outdated. Please checkout [GitHub - decafsucks/decafsucks: Rebuilding decafsucks.com as an OSS Hanami 2.0 example app](https://github.com/decafsucks/decafsucks). There you see how to use rom-rb properly. If you want to use sinatra, just check the code at [decafsucks/persistence.rb at main · decafsucks/decafsucks · GitHub](https://github.com/decafsucks/decafsucks/blob/main/config/providers/persistence.rb). But I recommend using hanami. You’ll be amazed ;).

best regards

---

<div class="post-metadata">

**Author:** ![mslinn](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.rom-rb.org/mslinn/32/288_2.png) [@mslinn](https://discourse.rom-rb.org/u/mslinn)\
**Post date:** [February 22, 2023, 2:03pm UTC](https://discourse.rom-rb.org/t/resurrecting-sinatra-rom/590/3 "2023-02-22T14:03:09Z")

</div>

Thanks, I will follow up on your suggestions.

Mike
