-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
generate-loc-seeddata execution fails #3
Comments
I tested my code on both ruby versions and put up the question on stackoverflow because I don't know what else can be going wrong. Somebody suggested a possible fix. Here is the link: http://stackoverflow.com/questions/10093440/ruby-script-running-on-local-machine-but-not-running-on-server-version-issues#comment12944991_10093440 What do you think? |
My guess is that on of your XPATH expressions evaluate into NIL (= don't match) and you execute some method (e.g, ".text") on NIL. Bernhard Bernhard Haslhofer On Wednesday, April 11, 2012 at 1:14 PM, Shion wrote:
|
I just did the following to debug: Copied my test maps directory, test metadata directory and script to the server to test the failure of the script on the server. Got the same error i.e. generate-loc-seeddata.rb:177:in Since the script with the exact same files and metadata work on my machine, they should also work on the server. However, they don't. Line 177:
Since the 'parent' method cannot be found, I am a little perplexed because it comes from REXML which I understand is part of the standard Ruby library. This needs more investigation. |
I am pretty sure that you a have a typical NULL Pointer exception, which occur when you try to execute a method (e.g., parent) on a NIL object. Maybe one of your XPATH expressions result in no match (= NIL), but you still call .parent…. b Bernhard Haslhofer On Friday, April 13, 2012 at 11:56 AM, Shion wrote:
|
maphub@samos:~/maphub-seeddata/scripts$ ruby generate-loc-seeddata.rb -i ../../data/maps/ -m ../../data/metadata/ -n 5
Finding all the map files...
Finding all the metadata files ...
Creating output YAML File
generate-loc-seeddata.rb:177:in
<main>': undefined method
parent' for nil:NilClass (NoMethodError)The text was updated successfully, but these errors were encountered: