LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices



Reply
 
Search this Thread
Old 04-17-2006, 11:06 AM   #1
fenrisW0lf
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:
Code:
REPOS="$1"
REV="$2"

EMAILS="fenris@myISP.com"

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


Here is the error message that I get sent to me via email:
Code:
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'
/usr/pkg/bin/svn_scripts/commit-email.rb:414
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:
Code:
require "tempfile"
#The line below was added after the above line
require "uri"
Change 2:
Code:
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
BradfordKHull
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.
 
  


Reply

Tags
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


All times are GMT -5. The time now is 05:31 AM.

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