Search code examples
rubygitsvngit-svn

Trying to get svn2git working on Windows


I'm migrating an SVN repository over to Git. The git-svn command doesn't handle the branches and tags properly but I stumbled across a tool called svn2git which seems to resolve this (https://github.com/nirvdrum/svn2git).

I've tried setting up this tool to work on Windows but I've not had much success.

I started off by copying the svn2git installation to C:\svn2git and downloading Ruby for Windows (http://rubyinstaller.org/) and saved it at C:\Ruby193.

Running svn2git came back with

/bin/env: ruby: No such file or directory

I then copied Ruby's bin and lib folders to svn2git's bin and lib folders respectively.

Running the svn2git then came back with

<internal:gem_prelude>:1:in `require': cannot load such file -- rubygems.rb (LoadError) from <internal:gem_prelude>:1:in `<compiled>'

Does anyone know how to get this working on Windows environment? Thanks


Solution

  • Obviously, rubygems.rb is missing. Install it as documented here:
    https://rubygems.org/pages/download

    Then, install svn2git as instructed here:
    https://github.com/nirvdrum/svn2git

    After that, everything shall be fine.