How to restrict create/put/delete operations in The Rails Port?

What apps do I need to run an OSM API locally? What is the layer between the web and pgsql that enables those queries. I look at and can’t understand what I need to run. My system is Ubuntu, and I can set up things in Unix systems. Found

Question #2: I want to keep some data from OSM in a local server, and allow editing some of the data, in particular allow to edit only relations of certain types.

I’m new to Ruby and RoR, but know Django and Python very well and can understand the logic of the app.