oneclick / rubyinstaller

RubyInstaller for Windows - Build recipes
http://rubyinstaller.org
BSD 3-Clause "New" or "Revised" License
1.19k stars 303 forks source link

Devkit Fails To Locate Registry Entry for Ruby 2.0.0 (64-bit) on Windows 7 #178

Open greena13 opened 11 years ago

greena13 commented 11 years ago

I have installed ruby 2.0.0p195 [x64-mingw32] on Windows 7 Ultimate, Service Pack 1 (64-bit) with no previous ruby or devkit versions installed. I then attempted to use the devkit installer DevKit-mingw64-64-4.7.2-20130224-1432-sfx.

I extracted the sfx to a directory without spaces and navigated the terminal to the root directory of the extracted files to run ruby dk.rb init. No ruby installations were detected.

I took a look at the dk.rb file and added 'Software\Wow6432Node\RubyInstaller\MRI' to the REG_KEYS array on line 12. The ruby installation was then detected when I ran ruby dk.rb init a second time and the installation proceded without error.

mkesper commented 11 years ago

Was able to reproduce this still with ruby 2.0.0p247 [x64]. x32 gets recognized.

luislavena commented 11 years ago

@mkesper indeed, I missed to see this issue when worked on the releases.

I'll work next weekend on this.

ghost commented 11 years ago

I can confirm this, I have ruby 2.0.0p195 (2013-05-14) [x64-mingw32] and it isn't recognized.

radum commented 11 years ago

I confirm this also, I just downloaded the latest ruby installer and dev kit and it is not detecting at first run. After updating the dk.rb file with what @greena13 said it worked ok.

cbmeeks commented 11 years ago

Again, same here. It did not detect my Ruby 2.0.0p247 using latest 64bit dev kit.

Even when I manually added the path to config.yml, it did not work. But adding 'Software\Wow6432Node\RubyInstaller\MRI' to the dk.rb file (which produced the same results as my manual entry) did the trick.

luislavena commented 11 years ago

Hello folks, thought you might be interested that I'm working on fixing this.

Appears the issue is not related to dk.rb script, but the installers not writing the proper registry keys.

The installers are running in 32bits mode, even when installing a 64bits version of Ruby, which result in corrupt registry keys.

I'm correcting this on the InnoSetup installers and will be part of the next version.

In the meantime, manual installation (by editing config.yml by hand) is the only option at this time.

luislavena commented 11 years ago

@liangchen1ce don't know what you're talking, the reported devkit and the version of ruby are correct, the problem reported is something related to the installer.

liangchen1ce commented 11 years ago

@luislavena I'm sorry, I did not read the issue right and thinking he might have used the wrong version. And I did not notice the 64x DevKit offered by rubyinstaller.org. I'd better delete the former comment.

ilikesci commented 10 years ago

Hello, I am having trouble as well. I am running windows 7 with ruby-2.0.0.p353 and devkit 4.7.2 x86-64. I have ran the ruby dk.rb.init and it did not detect my ruby at c:\ruby so I manually edited config.yml it to contain c:\ruby. Even after manually editing the file running ruby dk.rb install says it can not find my c:\ruby. I have c:\ruby\bin in my path so I can run from a terminal. The devkit is in c:\rdevkit. After manually editing it should it work or do I need to do something else? Do I need to edit dk.rb to get it to work? Is there another way to get rails working without the devkit? Thank You, Micah PS I tried c:/ruby, c://ruby, c:\ruby PSS I use mingw64 already plus cygwin64, could that be interfering with it?

luislavena commented 10 years ago

@ilikesci

The config.yml should read:

---
- C:/Ruby

As long C:\Ruby is the directory that contains your Ruby installation.

Having mingw64 and cygwin64 in the PATH can cause issues when installing gems, so please ensure those are not enabled when using Ruby.

A final recommendation: use the 32bits version instead. Things like Bundler and a few other gems have problems with 64bits version of Ruby.

ilikesci commented 10 years ago

Thank You, that did it.

dbdavis commented 10 years ago

Hello. I too join the chorus of devkit init failures. OS: Windows 7. Ruby version: Ruby-2.0.0-p353-x64-mingw32. Ruby location: C:\Ruby\ruby-2.0.0-p353-x64-mingw32. DevKit location: C:\Ruby\devkit. Adding the string: 'Software\Wow6432Node\RubyInstaller\MRI' to REG_Keys in dk.rb did nothing. Then, since the addition expected to see a 'RubyInstaller' node underneath a 'WOW6432Node', I searched my registry. Only 'Microsoft' exists under 'WOW6432Node'. Then I searched the entire registry for RubyInstaller. Nothing found at all.. In view of the comment by luislavena some time ago, I expect this relates to changes in how the installer functions. Will try the 32-bit as advised.

rhyeal commented 9 years ago

Running Windows 8.1 on a Macbook (via Bootcamp). I installed Ruby 2.1 x64 and the devkit. Init failed to detect any files.

I added 'Software\Wow6432Node\RubyInstaller\MRI' to the dk.rb file and it was able to detect the installation.

Azolo commented 9 years ago

Yeah, this is fixed as of #237 but there hasn't been a new DevKit released with the fix yet.

wstaples commented 8 years ago

Any update on this issue? It still appears to be happening with Windows Server 2012, Ruby 2.2.4p230 (2015-12-16 revision 53155) [x64-mingw32], Devkit 4.7.2.

brianrobertarmstrong commented 8 years ago

Ran into this issue with chocolatey today. The discussion in #237 makes it clear that a new DevKit release is a big deal, so I went poking around.
If I understand correctly, the root cause is that the Inno Setup installer is 32-bit, so its registry updates get redirected and aren't visible to dk.rb init running under 64-bit ruby.
Could the ArchitecturesInstallIn64BitMode=x64 directive solve this problem? If the installer runs in 64-bit mode, then it should create the HKLM/HKCU keys in the location that the current version of DevKit is expecting.
I plan to give it a try, but I don't know how long it will take me to get this thing building locally, so I figured I would throw the idea out there for everyone else.

qwebek commented 8 years ago

This is stll happening on windows 7 x64 and ruby231x64 and DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe Editing dk.rb file adding 'Software\Wow6432Node\RubyInstaller\MRI' seems to workaround the issue with ruby installation detection BUT it doesn't solve the problem with installing gems which require building native extensions, all that kind of gems will fail to install as devkit will fail to build them

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

UPDATE: To fix isue with building gem native extensions use --verbose parameter like

gem install json --platform=ruby --verbose