-
Notifications
You must be signed in to change notification settings - Fork 170
Windows can't install into anything other than C:\opscode #68
Comments
FWIW, installing to program files is pretty much never going to work or be supported. The ruby installer FAQ used to give you a real explanation but now it's just a smartass answer (https://github.com/oneclick/rubyinstaller/wiki/faq#no_pgmfiles). But anyway, it's a fact of life that we can't fix every ruby gem or C library a gem might use to support paths with spaces in its build process or other code. |
@danielsdeleo agreed. But from @juliandunn's description sounds like we can't install to |
@sersut probably. That said, what's the benefit of relocating the install if you can't install it into |
Having multiple chef installations might be a corner case scenario. E.g. for teams that are building CI infrastructures that builds chef-client 😸 I think we can leave this issue open and see the commonality. Based on the feedback we can turn changing the install directories off. |
I'd rather close it wont fix and let people add to the discussion if they have a compelling use case. |
👍 ^ |
A compelling use case to specify the directory location is that many people who work in Windows have a very small C: drive, or the corporate convention is to install to D: (or some other drive letter). So you need some way of letting people do that. Not letting people install in |
Yeah, it's not the DevKit people's fault. You can go through the bug reports for the project to see quite a few examples of this being a problem. There's a more informative explanation here (which used to be a lot easier to find) https://github.com/oneclick/rubyinstaller/wiki/Troubleshooting#for-some-strange-reason-it-fails-to-install-gems |
See also oneclick/rubyinstaller#135 which has some info about UAC problems that occur when installing to program files and a pointer to this: https://github.com/ruby/ruby/blob/trunk/win32/README.win32#L132-135 |
So I read a bunch of the prior art you pointed to, and I also came across this bug, which apparently was fixed >1 year ago in Ruby 2.0.0 so now you can compile extensions in directories with spaces in them: https://bugs.ruby-lang.org/issues/7036 The lines you pointed to in That said -- the UAC concern is legitimate. So maybe the right answer, as the poster pointed out in oneclick/rubyinstaller#135, is to default to something like Paging @adamedx to this thread. (We've had this conversation in the context of chef-client itself, too.) |
Even if ruby works correctly, we can't account for all the gems that might generate a Makefile with something like |
I want to +1 @juliandunn on not being able to install to other drive letters will be a blocker for entire shops. |
Also 👍 for being able to specify an alternate install location (I need it for bill's kitchen :-)). 100% fine with no spaces in the directory. Can that be checked in the installer? |
Workaround: in replace:
with
...and for the other commands as well... |
@juliandunn @danielsdeleo also noticed: some commands e.g.
Should rather be:
Otherwise it would use the system ruby instead. See also chef/chef#1512 (comment) |
Just checked, this is still present in ChefDK 0.2.0 |
+1 for this. My C: is tiny and does not like a 800mb install. |
User story 1: User story 2: |
The standard around installing is $env:programfiles. The c:\opscode thing is not a problem for Chef and I think ChefDK should work at least as well (though I think Chef has issues if you install anywhere other than $env:systemdrive). @danielsdeleo, we can huddle with @jdmundrawala / @btm to see what's possible. |
@adamedx anything with spaces is gonna be bad. It will probably work okay at first, but installing any gem with a C extension (likely to happen if a knife plugin installs/upgrades fog) is likely to blow up. Aside from that, we just need to do a little pathname magic in appbundler to handle the relative path. The code that needs to be fixed is here: https://github.com/opscode/appbundler/blob/d982fcd28f6aa234e2f24212ae15e30ee61d6b24/lib/appbundler/app.rb#L116 specifically |
Yeah, installer should probably forbid locations with spaces if possible. We could get fancy and try a symbolic link, otherwise I think the goal should be to make the install directory configurable with no limitation on volume and disallow spaces completely. |
@adamedx is it possible to have conditions like that in the installer? |
I know I make fun of this convention all the time, but would you still let people enter |
Just stumbled on this as well. It's not a case of whether or not it's in %PROGRAMFILES% or not, it's a case of allowing usage of established patterns on this platform. And keeping C: small on Windows is a very common pattern (i.e. for a fringe usage pattern: VMs where D: is full of portable versions and project data and there is one small core C: for the OS) A bit less common but something us obsessive/compulsive ones do is to keep the root of a drive tidy and not having it littered by all kinds of directories. So chef-dk will go under /tools etc. It took MS ages to manage that, let's not regress to the dark ages 😄 |
More evidence that supporting "Program Files" is completely out of the question right now because all the upstream ruby tooling is completely broken: |
+1 for being able to install to alternate drives, a very common practice in our shop where C: is often out of the question. No need to support paths with those %$#@! spaces in them. That was just a Redmond conspiracy to try to upend the *nix world. No need to cooperate with it. |
Anyone want to try using this to regenerate the executables and tell me if it works for you? chef/appbundler#5 |
@danielsdeleo is this included in the 0.3.2 ChefDK Release? |
No, we needed to get the CA cert stuff fixed right away so we didn't work on any other changes. I still need to fix some tests that I broke in appbundler in that PR, and maybe get another fix into appbundler, then ship the gem and then we can start using it in Omnibus. |
Good to know, thanks for the quick reply! |
Looking into ChefDK 0.3.2 windows package I probably found some more places which are problematic. Some of them might be fixed vai opscode/app-bundler#5 already, others may not. Here's what I found and what I'm currently working around in bills kitchen:
|
A few things:
|
I've created chef/omnibus-software#334 to track getting the fix in appbundler applied to the ChefDK package. |
+1 for this issue |
+1 |
…vely) as required for ChefDK 0.3.6
If you try to install ChefDK into anything other than
C:\opscode
, the install completes, but none of the commands will run:C:/Program Files (x86)/ChefDK/chefdk/bin/chef:44:in
load': cannot load such file -- c:/opscode/chefdk/embedded/apps/chef-dk/bin/chef (LoadError)from C:/Program Files (x86)/ChefDK/chefdk/bin/chef:44:in
<main>'
Examining all the .bat files, they have
c:\opscode
hardcoded into them.The text was updated successfully, but these errors were encountered: