Hi,
we are using Perforce for source configuration management and I have just started to hack some small stuff in Ruby on Rails. As Perforce follows the "check-out before modify" paradigm, and RoR expects to have all files writable for the various script/ stuff, do you know/use any helpers to make RoR work together with Perforce? I know I could just open all files for edit all the time, but is there something more elegant?
Thanks,
Henrik
views:
116answers:
3Not sure what you are asking: do want do check-out your files before you compile in your IDE -or- do you want to do perforce actions in a RoR application?
If it is the latter, try P4Ruby: http://public.perforce.com/guest/tony%5Fsmith/perforce/API/Ruby/main/doc/
The other requires IDE support, which is possible, however I cannot advise further unless you say which one you are using (Visual Studio, CodeGear, Notepad?).
HTH,
I use git for local RoR development, then git-p4 to synchronize with the Perforce server. My workarea files stay writable, I get all the benefits of git, and I stay in sync with others on my team who use Perforce.
"Check-out-before-edit" is Perforce's dominant paradigm, but not the only way to use it. Perforce has a good article on Working Disconnected, which sounds closer to your needs:
- Set up your Perforce workspace with the "allwrite" option
- Allow RoR to make any changes to any files it wants
- Update the server's view of your workspace by marking the files you added, deleted, and modified. You can use "Reconcile offline work" in p4v, or run several shell commands suggested in the "Working Disconnected" article.