devkit.rb should be portable #172

Open
jcsalomon opened this Issue May 17, 2013 · 8 comments

Projects

None yet

3 participants

@jcsalomon

I've got Ruby & DevKit on a flash drive, so the drive letter may change from one use to the next. I can set Ruby path in a batch file; e.g.,

set Path=%~d0\ruby-2.0.0-p0-i386-mingw32\bin;%Path%

but devkit.rb has the drive letter hard-coded; e.g.,

ENV['RI_DEVKIT'] = 'D:\\ruby-2.0.0-p0-i386-mingw32\\rubydev-4.7.2'

Is there a way to make this a relative path?

@luislavena
Member

@jcsalomon at this time, devkit installation mechanism is not very smart.

One of the alternatives a few others have been discussing is implement devkit as a gem, so you do something like:

C:\> gem install devkit
...
C:\> devkit configure --portable
Detected Ruby 2.0.0-p0 [i386-mingw32] in D:/ruby-2.0.0-p0
Recommended DevKit: mingw64-32-4.7.2
Installing relative to Ruby installation...
Done.

If no --portable option is provided, DevKit is installed in %APPDATA% along other DevKit versions, allowing reduce the download and continuous waste of time of setting it up on every installation.

Of course, this is only an idea as no code has been created for this.

If you want to contribute, I suggest you join RubyInstaller mailing group

@lamont-granquist

FWIW, supporting different drive letters would solve the biggest complaint that we get which is reasonable to solve which is that people make tiny C: drives. Making the package relocatable across drive letters would solve most of the solvable complaints.

@luislavena
Member

See latest post about this on RubyInstaller mailing list:

https://groups.google.com/d/topic/rubyinstaller/fZAmPSlz4zM/discussion

@lamont-granquist

Yeah, since we wrap Chef in our own installer we can set the PATH ourselves, and 'Program Files' is just a nightmare (although the direction you're heading looks good). We have been getting requests for making it all relocatable to D: or whatever though.

@luislavena
Member

@lamont-granquist I have an early prototype that plan to work the next week or so.

If you want, I can ping you once I have ironed out the first part and is somewhat usable, so I can gather more feedback.

@lamont-granquist

Best person to ping is actually @adamedx who really owns our windows stuff

@lamont-granquist

Also @jdmundrawala and @randomcamel are good contacts. I'm only transiently touching windows stuff to try to get our rubyinstaller upgraded to 2.1.3 and stumbled across this...

@luislavena
Member

@lamont-granquist @adamedx @jdmundrawala and @randomcamel, please take a look to this:

https://github.com/oneclick/devkit-gem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment