# Svn Integration with Rails application

**URL:** <https://www.ruby-forum.com/t/svn-integration-with-rails-application/173558>\
**Category:** Rails\
**Created:** [August 11, 2009, 1:18pm UTC](https://www.ruby-forum.com/t/svn-integration-with-rails-application/173558 "2009-08-11T13:18:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![charanya](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/b5e925/32.png) [@charanya](https://www.ruby-forum.com/u/charanya)\
**Post date:** [August 11, 2009, 1:18pm UTC](https://www.ruby-forum.com/t/svn-integration-with-rails-application/173558/1 "2009-08-11T13:18:51Z")

</div>

Hi

I am trying to implement a svn browser type of function in my  
application.I have installed the subversion bindings for Ruby and I am  
following  
[http://www.oneofthewolves.com/2007/03/06/ruby-subversion-bindings-finally-some-documentation/](http://www.oneofthewolves.com/2007/03/06/ruby-subversion-bindings-finally-some-documentation/)  
this site for accessing the subversion repository from my application.

I was testing the steps given in this site using"irb"

I did  
require “svn/repos”  
Svn::Repos.open(path to a repository which is in my local system")

Everything is working fine

But when i try to open the same repository through and try to access it  
like

Svn::Repos.open(“[http://localhost/svn/my\_repo](http://localhost/svn/my_repo)”)

I get an error saying,  
Svn::Error::SvnError:  
/build/buildd/subversion-1.5.1dfsg1/subversion/libsvn\_subr/io.c:2626  
Can’t open file ‘[http://localhost/svn/my\_repo/format](http://localhost/svn/my_repo/format)’: No such file or  
directory  
from /usr/lib/ruby/1.8/svn/util.rb:86:in `svn_repos_open' from /usr/lib/ruby/1.8/svn/util.rb:86:in `open’  
from /usr/lib/ruby/1.8/svn/info.rb:72:in `setup' from /usr/lib/ruby/1.8/svn/info.rb:34:in `initialize’  
from (irb):3:in `new’  
from (irb):

I am able to checkout ,commit and do all sort of svn related things  
using svn command on the shell prompt on this  
“[http://localhost/svn/my\_repo](http://localhost/svn/my_repo)”

Kindly Help me in solving this issue  
Thanks in Advance

---

<div class="post-metadata">

**Author:** ![charanya](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/b5e925/32.png) [@charanya](https://www.ruby-forum.com/u/charanya)\
**Post date:** [August 12, 2009, 10:39am UTC](https://www.ruby-forum.com/t/svn-integration-with-rails-application/173558/2 "2009-08-12T10:39:34Z")

</div>

Charanya N. wrote:

> Hi
> 
> I am trying to implement a svn browser type of function in my  
> application.I have installed the subversion bindings for Ruby and I am  
> following  
> [Loading......1S](http://www.oneofthewolves.com/2007/03/06/ruby-subversion-bindings-finally-some-documentation/)  
> this site for accessing the subversion repository from my application.
> 
> I was testing the steps given in this site using"irb"
> 
> I did  
> require “svn/repos”  
> Svn::Repos.open(path to a repository which is in my local system")
> 
> Everything is working fine
> 
> But when i try to open the same repository through and try to access it  
> like
> 
> Svn::Repos.open(“[http://localhost/svn/my\_repo](http://localhost/svn/my_repo)”)
> 
> I get an error saying,  
> Svn::Error::SvnError:  
> /build/buildd/subversion-1.5.1dfsg1/subversion/libsvn\_subr/io.c:2626  
> Can’t open file ‘[http://localhost/svn/my\_repo/format](http://localhost/svn/my_repo/format)’: No such file or  
> directory  
> from /usr/lib/ruby/1.8/svn/util.rb:86:in `svn_repos_open' from /usr/lib/ruby/1.8/svn/util.rb:86:in `open’  
> from /usr/lib/ruby/1.8/svn/info.rb:72:in `setup' from /usr/lib/ruby/1.8/svn/info.rb:34:in `initialize’  
> from (irb):3:in `new’  
> from (irb):
> 
> I am able to checkout ,commit and do all sort of svn related things  
> using svn command on the shell prompt on this  
> “[http://localhost/svn/my\_repo](http://localhost/svn/my_repo)”
> 
> Kindly Help me in solving this issue  
> Thanks in Advance  
> Hi  
> It seems the repo url is wrong

is the repo is created under the directory /svn/myrepo if so  
use svn://svn/myrepo  
if its /myrepo  
use svn://myrepo  
according to the path you used on creation of repo using the ‘svn’  
command.  
For using http for svn repo you should set up apache for that.

Hope this works, I assumed you simply setup a SVN server without Apache.

Regards.  
Anoop
