Script working on boot drive, but not external drive with space in the name. Please help!

I have three volumes on my computer all with the same identical copy of this script https://gist.github.com/c8f0ed9961a93c30b7ec

/Volumes/Data Drive /Volumes/Boot Drive /Volumes/Drobo

on my boot drive, the script works great on my Drobo, the script also works great

however on the Data Drive, I get a bad URi error. I am expecting this is because it's not my boot volume and it has a space in the name (why else would it work on the Drobo, and the Boot Drive?)

Here is the output of spec_paths spec/PlayerSpec.js spec/SliderSpec.js spec/SpecHelper.js

and here is the error I get for the URi /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ 1.8/uri/generic.rb:475:in `check_path': bad component(expected absolute path component): /Volumes/Data Drive/Slider/spec/ PlayerSpec.js (URI::InvalidComponentError)

from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ ruby/1.8/uri/generic.rb:495:in `path='   from /Users/jcontonio/.gem/ruby/1.8/gems/envjs-0.3.7/lib/envjs/ runtime.rb:173:in `extended'   from /Library/Ruby/Gems/1.8/gems/johnson-2.0.0.pre3/lib/johnson/ tracemonkey/js_land_proxy.rb:16:in `call'   from /Library/Ruby/Gems/1.8/gems/johnson-2.0.0.pre3/lib/johnson/ tracemonkey/js_land_proxy.rb:16:in `__send__'   from /Library/Ruby/Gems/1.8/gems/johnson-2.0.0.pre3/lib/johnson/ tracemonkey/js_land_proxy.rb:16:in `send_with_possible_block'   from /Library/Ruby/Gems/1.8/gems/johnson-2.0.0.pre3/lib/johnson/ ruby_land_proxy.rb:110:in `call_function_property'   from /Users/jcontonio/.gem/ruby/1.8/gems/envjs-0.3.7/lib/envjs/env.js: 105 [JavaScript]   from /Library/Ruby/Gems/1.8/gems/johnson-2.0.0.pre3/lib/johnson/ ruby_land_proxy.rb:110:in `method_missing'   from /Users/jcontonio/.gem/ruby/1.8/gems/harmony-0.5.6/lib/harmony/ page.rb:76:in `load'   from /Users/jcontonio/.gem/ruby/1.8/gems/harmony-0.5.6/lib/harmony/ page.rb:75:in `each'   from /Users/jcontonio/.gem/ruby/1.8/gems/harmony-0.5.6/lib/harmony/ page.rb:75:in `load'   from /Library/Ruby/Gems/1.8/gems/jazz_money-0.0.5/lib/jazz_money/ jasmine_runner.rb:75:in `load_js_includes'   from /Library/Ruby/Gems/1.8/gems/jazz_money-0.0.5/lib/jazz_money/ jasmine_runner.rb:74:in `each'   from /Library/Ruby/Gems/1.8/gems/jazz_money-0.0.5/lib/jazz_money/ jasmine_runner.rb:74:in `load_js_includes'   from /Library/Ruby/Gems/1.8/gems/jazz_money-0.0.5/lib/jazz_money/ jasmine_runner.rb:35:in `start'   from /Library/Ruby/Gems/1.8/gems/jazz_money-0.0.5/lib/jazz_money/ runner.rb:28:in `call'   from lib/run_specs.rb:25

Can anyone help me figure out how to solve this problem? I cannot rename the Data Drive, I have way too many aliases pointing to it since my Dropbox lives there.

I have three volumes on my computer all with the same identical copy of this scripthttps://gist.github.com/c8f0ed9961a93c30b7ec

/Volumes/Data Drive /Volumes/Boot Drive /Volumes/Drobo

on my boot drive, the script works great on my Drobo, the script also works great

however on the Data Drive, I get a bad URi error. I am expecting this is because it's not my boot volume and it has a space in the name (why else would it work on the Drobo, and the Boot Drive?)

Here is the output of spec_paths spec/PlayerSpec.js spec/SliderSpec.js spec/SpecHelper.js

and here is the error I get for the URi /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ 1.8/uri/generic.rb:475:in `check_path': bad component(expected absolute path component): /Volumes/Data Drive/Slider/spec/ PlayerSpec.js (URI::InvalidComponentError)

Looks like (I'll confess to knowing nothing about jazz_money) something in there is trying to construct a file:// url from the data you give it and is falling over because it's not escaping the data first. You could try doing the escaping for it (ie replace spaces with %20))

Fred

Thanks for the response but I tried tacking on an escaped path to the beginning of the path variable and it still gives me the same error. Also notice that my boot drive has a space in it's volume name and the script runs fine.

Thanks for the response but I tried tacking on an escaped path to the beginning of the path variable and it still gives me the same error. Also notice that my boot drive has a space in it's volume name and the script runs fine.

Assuming this is on a mac that's probably because although the boot drive is mounted at /Volumes/Boot Drive it's also mounted at / (So its name is irrelevant) I'd step through the source to see what path is causing an exception to be raised and to see whether the attempts to supply an escaped path have produced something that looks correct or not.

Ah that would make sense for the boot drive. I've escaped the path and I still get the issue. I am eventually going to end up renaming the volume and re-linking all my aliases.

yaphi wrote in post #962145:

Ah that would make sense for the boot drive. I've escaped the path and I still get the issue. I am eventually going to end up renaming the volume and re-linking all my aliases.

Better yet, report a bug for the library. This is not acceptable behavior on its part. You shouldn't have to rename your drives.

On Nov 17, 2:50am, Frederick Cheung <frederick.che...@gmail.com>

Best,

The library is the URi class in Ruby right?

Please quote when replying.

yaphi wrote in post #962152:

The library is the URi class in Ruby right?

It looks like the jazz_money gem is probably what's causing the problem.

Best,