views:

128

answers:

1

what could be the possible reason that my ruby script is not being called successfully?

note that when i manually execute the post-commit script like so:

/var/svn/eweds/hooks/post-commit /var/svn/eweds 151

works just fine, the way my ruby sript is called in the post-commit script is like this:

ruby /home/pmind/public_html/eweds/script/svn.rb "$REPOS" "$REV"

So i'm actually stumped why manually calling the hook script works but it doesn't when its actually executed when a user does an actual commit.

note that I know the hook-script is being called. my ruby sript is however not being executed successfully.

also note that the svn is started as root, the post-commit script is root too and the ruby script permissions is already set to 777.

A: 

Specify the full path to the ruby interpreter instead of simply ruby.

Simone Carletti
hey guys thanks! I'm making some progress, now i get an error. Perhaps i need to set a home path? In my bash profile? but when i did this: echo $HOME, i get a path, which is my home path. any ideas? - http://pastebin.com/m4b88f985 --------------------------------------------------------Warning: 'post-commit' hook failed with error output: /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails_generator/lookup.rb:35:in `expand_path': couldn't find HOME environment -- expanding `~' (ArgumentError) from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails_generator/lookup.rb:35:in `user_home'
David