Accessing Svn through rails

Hi

I am trying to combine SVN with my rails application
I want to get a file from the svn repository of the current version.
My app will provide facility for the user to upload a diff file.
And from this diff file and the file i got from the repository,I would
like to build the file with modification.

Is there any gem to support this? Or wat other methods can i use for
this.

Kindly reply
Thanks in advance