C:\>gem install json
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
C:/Ruby/bin/ruby.exe extconf.rb
checking for ruby/st.h... no
checking for st.h... yes
checking for ruby/encoding.h... no
creating Makefile
make
make: *** No rule to make target `ruby.h', needed by `generator.o'. Stop.
Gem files will remain installed in
C:/Ruby/lib/ruby/gems/1.8/gems/json-1.1.9 for inspection.
Results logged to
C:/Ruby/lib/ruby/gems/1.8/gems/json-1.1.9/ext/json/ext/generator/gem_make.out
What's going on there? Have I got a problem with my devkit?
Cheers,
Charles
Looks like you have. Search the archives for gcc batch script fixes or check my binfiles repository at github.
Sent from mobile.
What might be causing that?
Thanks for the suggestion Luis, I'll have a hunt around.
Charles
2009/10/9 Luis Lavena <luisl...@gmail.com>:
2009/10/9 Charles Roper <charle...@gmail.com>:
Hehehe, post your PATH,I will check.
Sent from mobile.
On Oct 9, 2009 6:27 PM, "Charles Roper" <charle...@gmail.com> wrote:
And if I run setrbvars.bat, then that also makes it work. So I have an
issue with my path. Any ideas as to what could be wrong?
2009/10/9 Charles Roper <charle...@gmail.com>:
> Hrm, weird. If I start Ruby from the shortcut installed by the > installer (ruby 1.8.6 (2009-08-04...
It's a long one:
Path=c:\program
files\imagemagick-6.4.5-q8;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common
Files\Roxio Shared\9.0\DLLShared\;C:\Program Files\Bitvise
Tunnelier;C:\Program Files\Microsoft SQL
Server\80\Tools\Binn\;C:\Program Files\Microsoft SQL
Server\90\Tools\binn\;C:\Program Files\Microsoft SQL
Server\90\DTS\Binn\;C:\Program Files\Microsoft SQL
Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft
Visual Studio 8\Common7\IDE\PrivateAssemblies\;C:\Program
Files\e\cmd;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\usr\local\wbin;C:\bin;C:\Program
Files\QuickTime\QTSystem\;C:\Program Files\Git\cmd;C:\Program
Files\Git\bin;C:\Program Files\TortoiseGit\bin;C:\Program
Files\TortoiseHg;H:\My Dropbox\Software\Locate32;C:\Ruby\bin
Cheers Luis.
Charles
> Smelly things:
>
> C:\usr\local\wbin
> C:\bin
> C:\Program Files\Git\bin
> C:\Program Files\Git\cmd
>
> If you can use a which or where finder, search for "gcc", "make" and
> "sh" that could be in the PATH.
C:\>which make.bat && which gcc.bat && which sh.bat
C:\Ruby\bin\make.bat
C:\Ruby\bin\gcc.bat
C:\Ruby\bin\sh.bat
If the ruby path is added to the beginning of my path, it works. I'll
look into this further over the weekend perhaps.
Thanks Luis.
Charles
Yeah, I thought of that once I had got home (the problems were on my
work PC), and now I don't have access to my work PC until Monday. Sigh.
Thing is, I tried using which on sh, gcc and make without the extensions
and it returned nothing, which is what lead me to looking for the bat
files. I didn't think of looking for .exe files at the time; I'm sure
I'll turn up the culprits when I do.
Roger, sounds like your whichr would have found what I was looking for.
Have you considered adding it to Gemcutter?
I'll let you guys know what the answer to this thrilling mystery turned
out to be on Monday. Betcha can't wait, huh?
Is the final RubyInstaller going to sort out the PATH for you? I see you
guys have been having lengthy conversations (which I admit I haven't
been following) about it.
Cheers,
Charles
Cheers,
Charles
2009/10/10 Jon <jon.f...@gmail.com>:
Great, and thanks!
I'm anxious to see how well the updated PATH and PATHEXT code works in the wild as these registry changing things tend to cause more than there share of bug reports if the installer makes a bunch of bad assumptions.
Jon
1.8.6 seems to have installed fine. Here's my path post-install:
C:\FakeRuby18\bin;C:\Ruby\bin;c:\program
files\imagemagick-6.4.5-q8;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common
Files\Roxio Shared\9.0\DLLShared\;C:\Program Files\Bitvise
Tunnelier;C:\Program Files\Microsoft SQL
Server\80\Tools\Binn\;C:\Program Files\Microsoft SQL
Server\90\Tools\binn\;C:\Program Files\Microsoft SQL
Server\90\DTS\Binn\;C:\Program Files\Microsoft SQL
Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Microsoft
Visual Studio 8\Common7\IDE\PrivateAssemblies\;C:\Program
Files\e\cmd;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\usr\local\wbin;C:\bin;C:\Program
Files\QuickTime\QTSystem\;C:\Program Files\Git\cmd;C:\Program
Files\Git\bin;C:\Program Files\TortoiseGit\bin;C:\Program
Files\TortoiseHg
Here's PATHEXT:
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.PSC1;.RB;.RBW
Also,
> which sh.exe
C:\bin\sh.exe
Erm, I've no idea what that is doing there. It's gone now. Ahem. Smelly indeed.
> which make.exe
C:\usr\local\wbin\make.exe
That's now gone too. How I manage to get this cruft into my system
I'll never know!
Cheers guys.
Charles
Just a quick followup:
Uninstalling the fake installer successfully removed the fakeinstaller
reference from the PATH and also removed the references in PATHEXT.
Note, when I installed the new PATH didn't seem to kick in after
installing - I guess I would have needed to log-out and in again (or
reboot). Is that the expected behaviour?
Charles
Was this in a newly spawned cmd.exe or an existing cmd.exe that the new PATH didn't kick in? If it's only an existing cmd.exe, I think it's one of the many peculiarities of cmd.exe.
Bottom line, there's nothing in the current code that should require a log-out/log-in or reboot cycle. If either of these are required, we've got a bug to find and fix.
Jon
http://github.com/jonforums/rubyinstaller/raw/installer/recipes/packager/install_utils.rake
Put it in any directory, and run it like the following at various stages in your installer testing to tell what the installer's done to your registry. Updates as I get time to make them, or feel free to send patches :)
# What tasks exist?
>rake -f install_utils.rake -T
(in C:/Users/Jon/Documents/RubyDev/rubyinstaller-trunk/recipes/packager)
rake installer:reg[step,hive] # List installer registry info
# How do I use it?
>rake -f install_utils.rake installer:reg
(in C:/Users/Jon/Documents/RubyDev/rubyinstaller-trunk/recipes/packager)
usage: rake installer:reg[step,hive]
where 'step' is:
in- check system config before installation
in+ check system config after installation
un check system config after uninstallation
and 'hive' is:
hkcu HKEY_CURRENT_USER hive reference
hklm HKEY_LOCAL_MACHINE hive reference
# Dump registry values before RubyInstaller runs
>rake -f install_utils.rake installer:reg[in-,hkcu]
(in C:/Users/Jon/Documents/RubyDev/rubyinstaller-trunk/recipes/packager)
=== PRE-INSTALL 10/14/2009 14:47:49 ===
HKEY_CURRENT_USER\Software\Classes\.rb => rb_auto_file
ERROR: unable to find registry key or value HKEY_CURRENT_USER\Software\Classes\.rbw
ERROR: unable to find registry key or value HKEY_CURRENT_USER\Software\Classes\RubyFile\shell\open\command
ERROR: unable to find registry key or value HKEY_CURRENT_USER\Software\Classes\RubyFile\DefaultIcon
ERROR: unable to find registry key or value HKEY_CURRENT_USER\Software\Classes\RubyWFile\shell\open\command
ERROR: unable to find registry key or value HKEY_CURRENT_USER\Software\Classes\RubyWFile\DefaultIcon
HKEY_CURRENT_USER's Path => C:\Python26\Scripts;C:\Python26;C:\gnuwin32\wget\bin;C:\gnuwin32\grep\bin;C:\gnuwin32\diff\b
in;C:\gnuwin32\less\bin;C:\gnuwin32\curl\bin;C:\gnuwin32\which\bin;C:\gnuwin32\astyle\bin;C:\subversion\bin;C:\Users\Jon
\Documents\JavaDev\ant\bin;C:\Program Files\Java\jdk1.6.0_16\bin;C:\Users\Jon\Documents\JavaDev\scala\bin;C:\lua\bin;C:\
groovy\bin;c:\gant\bin;C:\Program Files\Wix;C:\ruby19\bin;C:\Users\Jon\Documents\WebDev\appengine;C:\jruby\bin;c:\boo\bi
n;C:\Program Files\Putty;c:\git\cmd;C:\Program Files\Premake
ERROR: unable to find registry key or value HKEY_CURRENT_USER's PATHEXT
Jon