Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

URI.parse breaks using RVM and gemset #13

Closed
carlosantoniodasilva opened this Issue · 6 comments

2 participants

@carlosantoniodasilva

As RVM creates folders using the % sign to separate ruby version and gemset, it breakes URI.parse:

~/.rvm/gems/ruby-1.8.7-p249%rails3

I have updated envjs to use URI.escape before parsing the file name, so it will escape the % sign. Tests pass here after this change, but I don't know how I could add a test to it.

I'm sending a pull request with the changes in my fork, please take a look.
Thanks, Carlos

@smparkes
Owner

Thanks! Should be able to get to it tomorrow ....

@carlosantoniodasilva

Nice, thanks.

@smparkes
Owner

Yuck.

I think this will result in double escaping for real URLs that have escape sequences in them.

Could you look at maybe catching the exception that URI.parse throws and in that specific case, creating a file URI, sort of like the heuristic is doing now?

@carlosantoniodasilva

Hum... okay.. I'll take a look on that...
Thanks.

@carlosantoniodasilva

Steven, I noticed by updating my rvm installation (a bit old huh?) that it now uses @ instead of %, so it won't break with env-js anymore. So the solution is to update rvm.
I guess you can close this issue.
Thanks for your help and time.

@smparkes
Owner

Cool. Good to avoid %s in filenames (hadn't thought of that before); glad RVM got tweaked.

envjs should probably allow %'s in paths that dont' start as URIs, but we can make it lower priority.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.