问题描述
尝试安装时
'bcrypt-ruby', :lib => 'bcrypt'
和
'hpricot'
我在两种情况下都得到这个(使用 Windows XP)
I get this in both cases (Using Windows XP)
C:/Ruby/bin/ruby.exe: No such file or directory -- extconf.rb (LoadError)
我从这里安装 http://rubyinstaller.org/downloads/ Rb 1.8.6,包括开发套件
I installed from here http://rubyinstaller.org/downloads/ Rb 1.8.6, including the devkit
有什么提示吗,谢谢
推荐答案
现在在 RubyInstaller Wiki 解决了这个潜在问题:
There's now an entry in the RubyInstaller Wiki that addresses this potential issue:
使用命令提示符,调用以下命令:
REG QUERY "HKCU\Software\Microsoft\Command Processor"
REG QUERY "HKLM\Software\Microsoft\Command Processor"
单独执行每一行.一次你运行它,会看到类似的东西这个:
Execute each line individually. Once you run it, will see something like this:
HKEY_CURRENT_USER\Software\Microsoft\Command Processor
CompletionChar REG_DWORD 0x9
DefaultColor REG_DWORD 0x0
EnableExtensions REG_DWORD 0x1
PathCompletionChar REG_DWORD 0x9
信息列是Key,类型和值.如果您看到一个名为的键AutoRun,有可能这是您收到错误的罪魁祸首.AutoRun 干扰 Ruby 乱码随着子进程执行和结果,影响gem安装.请使用以下命令将其删除命令:
The columns of information are Key, Type and Value. If you see a key named AutoRun, there is a chance this is the culprit of the error you’re receiving. AutoRun interferes with Ruby messing with child process executing and by result, affecting gem installation. Please remove it with the following command:
REG DELETE "HKCU\Software\Microsoft\Command Processor" /v AutoRun
完成后,尝试打开一个新的命令提示符和执行 gem重新安装.
Once you’re done, try opening a new command prompt and executing gem installation again.
这篇关于无法构建 gem 本机扩展 - 找不到 extconf.rb的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!