0

I'm building a rails (rails 6) app that facilitates collaboration on math papers. As the papers are usually written in tex but produce PDFs there may be pictures of blackboards, text note files and sketches I'd like to avoid resolving the merge/source control issues and simply serve a git repository to members of that group of users who want to clone it. But not everyone wants to use the gitcli and the point is to create a single page to manage the collaboration so I also need to be able to display and edit (eg issue commits) directly from the webapp (likely restricted to only fast forwards to master...at least at first).

I suspect there is a gem or engine that allows this and it might even have been answered before here but all my attempts to search just return discussions about using git to version your rails app not using it in the app.

Heck, I'm even willing (at least to hack together a quick working version) to insist that one of the group members setup a GitHub repo and grant some kind of permission to the app (and other users who want direct repo access) if that's a quicker and easier way to hack together a quick solution but I need the rails app to be able to make commits and query the head.

Any suggestion for existing utilities that allow this? If not suggestions on the best way to approach coding that functionality?

Peter Gerdes
  • 2,288
  • 1
  • 20
  • 28
  • 1
    Does this answer your question? [git command in rails controller](https://stackoverflow.com/questions/19608829/git-command-in-rails-controller) – Int'l Man Of Coding Mystery Jun 02 '21 at 12:23
  • @Int'lManOfCodingMystery Well I was about to say no because the question was way different (I was looking to serve and modify repos like a lite version of GitHub...or leverage their API for them to do) but the last answer pointed me to two good libraries and that's plenty for me to figure it out (my real problem was I just couldn't search for the libs w/o knowing a name since any combo of rails and git is overwhelmed by ppl tracking their rails code). So thanks immensely, that's very helpful...I'll post that as and. – Peter Gerdes Jun 02 '21 at 12:28

1 Answers1

1

This answer (thanks to Int'l man of coding mystery for the pointer) suggests using the library Ruby/Git or Rugged. I haven't had the chance to look closely at the libraries but that solves the problem I had of being unable to find them with search thanks to all the results about putting your ruby code in a git repo.

Peter Gerdes
  • 2,288
  • 1
  • 20
  • 28