Visit Jeremy's Blog.
Go Back > Forums > Other *NIX Forums > *BSD
User Name
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.


  Search this Thread
Old 04-17-2006, 11:06 AM   #1
LQ Newbie
Registered: Dec 2005
Posts: 16

Rep: Reputation: 0
Subversion ruby script fails

Hi all. I have Subversion running on NetBSD 3.0 and it was working very well. The other day I updated pkgsrc using cvs and I upgraded all of my installed packages using pkg_chk (which I have done successfully many times before). Before the update everything was working perfectly.

I have a post-commit hook in place so that when changes are commited a script is fired.

Contents of the post-commit script:


/usr/pkg/bin/svn_scripts/commit-email.rb "$REPOS" "$REV" $EMAILS --name "Code Te
sts Repo" -f "" --no-diff --repository-uri "myserverURL"

Here is the error message that I get sent to me via email:
NameError: uninitialized constant Svn::Client
/usr/pkg/lib/ruby/site_ruby/1.8/svn/util.rb:58:in `svn_repos_fs_wrapper'
/usr/pkg/lib/ruby/site_ruby/1.8/svn/util.rb:58:in `fs_wrapper'
/usr/pkg/lib/ruby/site_ruby/1.8/svn/repos.rb:85:in `fs'
/usr/pkg/lib/ruby/site_ruby/1.8/svn/info.rb:49:in `setup'
/usr/pkg/lib/ruby/site_ruby/1.8/svn/info.rb:34:in `initialize'
/usr/pkg/bin/svn_scripts/commit-email.rb:387:in `main'
It is also located here "/usr/pkg/share/examples/subversion/ruby/commit-email.rb" within the NetBSD file system. I imagine that it is the same script on other O/S's as well. I added 2 lines to the script so that links would be properly formated in the email that is sent out.

Change 1:
require "tempfile"
#The line below was added after the above line
require "uri"
Change 2:
link = [uri, key].compact.join("/")
#The line below was added after the above line
link = URI.encode(link)

I don't think it is a subversion problem as I can commit/update/check out files properly. I think it is a ruby problem. I know very little about Ruby (just enough to make minor modifications), so any ideas would be greatly appreciated.
Old 12-21-2007, 07:57 PM   #2
LQ Newbie
Registered: Sep 2006
Location: Near Seattle
Distribution: Ubuntu 6.06
Posts: 3

Rep: Reputation: 0
A bread crumb, at least

The message you got means that it could not find the subversion-ruby SWIG bindings; Svn::Client is the most direct class in that set for working with subversion in Ruby. I don't know what about your update caused that to not be visible to ruby when running that script, but I suggest you make an effort to re-install those subversion ruby bindings in whatever form they can be found in. I'm sorry I can't be more specific; if you're running BSD, my Linux-based advice would not be helpful, but I hope this will help you find it.


netbsd, ruby, subversion

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenVPN script fails Echo Kilo Linux - Networking 1 01-25-2006 11:13 PM
cron spawning extra crond - script fails jbob75 Linux - Software 2 11-21-2005 05:29 AM
grep in shell script fails on redhat 3.0 rlangsto Linux - General 4 03-06-2005 08:42 PM
How to install Subversion(Version Control with Subversion) under RedHat Linux. netkiller Linux - Networking 1 07-01-2004 06:45 AM
Samba 2.2.7a fails to call add user script on Red Hat 9 DrFooMod2 Linux - Networking 4 07-17-2003 10:33 PM > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 11:06 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration