Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

ruby on rails - Failed to build gem native extension - extconf.rb not found

When trying to install

'bcrypt-ruby', :lib => 'bcrypt'

and

'hpricot'

I get this in both cases (Using Windows XP)

C:/Ruby/bin/ruby.exe: No such file or directory -- extconf.rb (LoadError)

I installed from here http://rubyinstaller.org/downloads/ Rb 1.8.6, including the devkit

any hints?, thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

There's now an entry in the RubyInstaller Wiki that addresses this potential issue:

Using a command prompt, invoke the following commands:

REG QUERY "HKCUSoftwareMicrosoftCommand Processor"
REG QUERY "HKLMSoftwareMicrosoftCommand Processor"

Execute each line individually. Once you run it, will see something like this:

HKEY_CURRENT_USERSoftwareMicrosoftCommand Processor
    CompletionChar    REG_DWORD    0x9
    DefaultColor    REG_DWORD    0x0
    EnableExtensions    REG_DWORD    0x1
    PathCompletionChar    REG_DWORD    0x9

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 "HKCUSoftwareMicrosoftCommand Processor" /v AutoRun

Once you’re done, try opening a new command prompt and executing gem installation again.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...