Issue installing caldecott, make inoperable command - ruby

I've been trying to install this for a few days now with no success. Looking for help, I've been through this site a half dozen times to try and resolve the issue but I'm not having any luck.
c:\Ruby193\DevKit>gem install caldecott --platform=ruby
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing caldecott:
ERROR: Failed to build gem native extension.
C:/Ruby193/bin/ruby.exe extconf.rb
creating Makefile
make
'make' is not recognized as an internal or external command,
operable program or batch file.
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/escape_ut
ils-0.3.2 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/escape_utils-0.3.2/ext/esc
ape_utils/gem_make.out
I've attempted to follow the instructions on this post
-Make Is Not Recognized as an internal or exernal command
By Doing this:
c:\Ruby193>set make=mingw32-make
I unfortunately still get:
c:\Ruby193>gem install caldecott --platform=ruby
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing caldecott:
ERROR: Failed to build gem native extension.
C:/Ruby193/bin/ruby.exe extconf.rb
creating Makefile
mingw32-make
'mingw32-make' is not recognized as an internal or external command,
operable program or batch file.
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/escape_ut
ils-0.3.2 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/escape_utils-0.3.2/ext/esc
ape_utils/gem_make.out
I've also done:
c:\Ruby193\DevKit>gem install eventmachine --pre
As discussed here.
-Error Installing Caldecott
HALP!!! What am I doing wrong?
Windows 7
Running CMD as Admin
Ruby v1.9.3
DevKit - installed, in Ruby Folder, and postinstall ran
Update:
I've attempted to create my own match.bat file in the c:/ruby193/devkit/mingw/bin that should forward the make command to mingw32-make, still successful but here is my code for the batch (match.bat) file.
#echo off
mingw32-make %*
As explained on this forum.
-make.bat
Still no luck, I'll likely continue to roll my face on the keyboard until I find a solution.

Can you try to install without platform arugment, simply this command
$ gem install caldecott
what error you get now?

Related

issue installing a gem

I've checked many other posts but I can't seem to find a solution, I get the same error each time I try to install this gem. I've tried reinstalling and even changing ruby versions (I tried my original 25 install then the latest 26 then 25), but nothing worked.
here's the log:
PS X:\Windows\system32> gem install solargraph
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
ERROR: Error installing solargraph:
ERROR: Failed to build gem native extension.
current directory: X:/Program Files (x86)/Ruby25-x64/lib/ruby/gems/2.5.0/gems/jaro_winkler-1.5.4/ext/jaro_winkler
"X:/Program Files (x86)/Ruby25-x64/bin/ruby.exe" -r ./siteconf20191204-11892-whysdy.rb extconf.rb
creating Makefile
current directory: X:/Program Files (x86)/Ruby25-x64/lib/ruby/gems/2.5.0/gems/jaro_winkler-1.5.4/ext/jaro_winkler
make "DESTDIR=" clean
Makefile:267: *** multiple target patterns. Stop.
current directory: X:/Program Files (x86)/Ruby25-x64/lib/ruby/gems/2.5.0/gems/jaro_winkler-1.5.4/ext/jaro_winkler
make "DESTDIR="
Makefile:267: *** multiple target patterns. Stop.
make failed, exit code 2
Gem files will remain installed in X:/Program Files (x86)/Ruby25-x64/lib/ruby/gems/2.5.0/gems/jaro_winkler-1.5.4 for inspection.
Results logged to X:/Program Files (x86)/Ruby25-x64/lib/ruby/gems/2.5.0/extensions/x64-mingw32/2.5.0/jaro_winkler-1.5.4/gem_make.out
Ruby was installed in Program Files (x86) which contains a space, which apparently MINGW gems, such as jaro_winkler, don't agree with, so if you encounter this issue change your Ruby install location.

Guide to installing ta-lib on Windows for Ruby gem

I have tried for quite a while to install ta-lib so I can use some of the indicator functions for trading based on this github example. So far I have determined that I need to:
run gem install talib_ruby
C:\Users\king\Desktop\_REPOS\misc\stock_analysis\forex\oanda\ruby>gem install talib_ruby
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing talib_ruby:
ERROR: Failed to build gem native extension.
C:/Ruby22-x64/bin/ruby.exe -r ./siteconf20160810-7176-j5lye2.rb extconf.rb
checking for TA_Initialize() in -lta_lib... no
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
generating talib-x64-mingw32.def
compiling talib.c
talib.c:2:32: fatal error: ta-lib/ta_abstract.h: No such file or directory
compilation terminated.
make: *** [talib.o] Error 1
make failed, exit code 2
....
Download ta-lib header files which are in the msvc from here
Tell the talib_ruby gem where the ta-lib files when installing. Based on this SO post the correct command should look something like: sudo env ARCHFLAGS="-arch x86_64" gem install talib_ruby -- --with-talib-include=/opt/local/var/macports/software/ta-lib/0.4.0_0/opt/local/include/ta-lib --with-talib-lib=/opt/local/var/macports/software/ta-lib/0.4.0_0/opt/local/lib
. The command specifies a path to a lib folder which is missing from the ta-lib I downloaded. Does anyone know how to fix this?
Windows?
Sorry for my english.
My system: Windows 7 SP1 x64, ruby 2.2.4p230
You have to install Ruby Development Kit to build the binary extensions.
Download and extract source, I used ta-lib-0.4.0-src.tar.gz.
Run msys.bat from Ruby DevKit or if you have installed mingw as part of RubyInstaller, run either mingw64.exe or ming32.exe. Navigate to ta-lib source files (in my case it is /d/dev/ta-lib) and build the library:
cd /d/dev/ta-lib
./configure
make
Because the path to C headers hardcoded in gem to #include <ta-lib/ta_abstract.h>, I just make a new directory ta-lib within d:\dev\ta-lib\include source folder and all copy header files here. (Files in d:\dev\ta-lib\include*.h are copied to d:\dev\ta-lib\include\ta-lib)
Install gem. Exit the msys or mingw terminal and run the following in your Windows cmd. Be sure to replace these paths with the correct path to your ta-lib source:
gem install talib_ruby -- --with-talib-include=d:/dev/ta-lib/include --with-talib-lib=d:/dev/ta-lib/src/.libs
Make sure to change paths to yours.

Failing to install Jekyll gem native extension on Windows with "multiple target patterns"

I'm trying to get Jekyll up and running on my Windows 7 machine, but installing the gem fails with a make exception. I'm basically following the instructions provided by Madhur Arhuja plus some "fixes" due to some seemingly wrong links. Here is what I did:
Downloaded and installed ruby 1.9.3 p448
Downloaded and extracted the RubyDevelopmentKit from the same page.
In my Git Bash from the directory where I installed the development kit I ran
ruby dk.rb init
ruby dk.rb install
gem install jekyll
The first two steps worked fine. I got some Info output, no errors. But the last step created this:
$ gem install jekyll
Fetching: liquid-2.5.1.gem (100%)
Fetching: fast-stemmer-1.0.2.gem (100%)
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing jekyll:
ERROR: Failed to build gem native extension.
"c:/Program Files/Ruby193/bin/ruby.exe" extconf.rb
creating Makefile
make
Makefile:222: *** multiple target patterns. Stop.
Gem files will remain installed in c:/Program Files/Ruby193/lib/ruby/gems/1.9.1/gems/fast-stemmer-1.0.2 for inspection.
Results logged to c:/Program Files/Ruby193/lib/ruby/gems/1.9.1/gems/fast-stemmer-1.0.2/ext/gem_make.out
In Very simple application fails with "multiple target patterns" from Eclipse I found that this might be related to the unix emulator, so I ran the last command again in the windows shell, but with the same result.
Since I have no idea about ruby, c, make or anything involved I'm completely stuck :-(
Ok just a try. The Makefile on this line (and following) defines the target for .m.o.
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$# -c $<
Everything looks ok if you're using mingw / cygwin, but INCFLAGS can make problems on window machines, if you've installed ruby in a directory with spaces.
INCFLAG is defined as INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir) and if you see my definition below there is no space in any path.
topdir = /C/Ruby200-x64/include/ruby-2.0.0
hdrdir = $(topdir)
arch_hdrdir = C:/Ruby200-x64/include/ruby-2.0.0/x64-mingw32
If I change the ruby installation to a path with spaces I get invalid option error in native windows command line and in the mingw session. Maybe this is could help.

Installing dm-types on Windows. (Win7 x64)

I am trying to install dm-types for DataMapper on my machine with
gem install dm-types
I've installed Ruby from RubyInstaller (1.9.3) and I also have the DevKit installed. (Aswell as some other gems like sinatra, haml, dm-core and bcrypt-ruby).
However, when I run "gem install dm-types", this happens.
C:\Users\Lev>gem install dm-types
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing dm-types:
ERROR: Failed to build gem native extension.
"C:/Program Files (x86)/Ruby/Ruby193/bin/ruby.exe" extconf.rb
creating Makefile
make
Makefile:172: warning: overriding commands for target `C:/Program'
Makefile:163: warning: ignoring old commands for target `C:/Program'
Makefile:172: warning: overriding commands for target `Files'
Makefile:163: warning: ignoring old commands for target `Files'
Makefile:215: *** multiple target patterns. Stop.
Gem files will remain installed in C:/Program Files (x86)/Ruby/Ruby193/lib/ruby/
gems/1.9.1/gems/json-1.6.5 for inspection.
Results logged to C:/Program Files (x86)/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/j
son-1.6.5/ext/json/ext/parser/gem_make.out
My google-fu revealed that there are/were some bcrypt dependencies that won't build on windows but bcrypt installed flawlessly. I also have nmake.exe in my system path.
So how can I get dm-types to work on Windows 7 x64?
Also, I have absolutely no objection to wiping my machine clean of all ruby-related things and starting again.
It looks the the spaces in the path for ruby are screwing up the makefile. Maybe try creating a symlink on Windows temporarily, like:
mklink /d c:\ruby "C:\Program Files (x86)\Ruby\Ruby193"
and then try installing. You can delete the symlink after installing.
C:\ruby\bin\gem install dm-types
What Mayro said was right on the money, the thing I had to look out for was that In addition to the user PATH the link to the DevKit was also in the System Variables PATH which had the link that was causing my problem.
Or set your PATH in environment variables to C:\Progra~2\Ruby\Ruby193\bin instead of C:\Program Files\Ruby\Ruby193\bin
Progra~1 should be Program Files, Progra~2 should be Program Files (x86)

Cannot install RCov from Gem

gem install rcov
Error:
Building native extensions. This could take a while...
ERROR: Error installing rcov:
ERROR: Failed to build gem native extension.
"C:/Program Files/Ruby191/bin/ruby.exe" extconf.rb
creating Makefile
make
Makefile:154: warning: overriding commands for target `C:/Program'
Makefile:148: warning: ignoring old commands for target `C:/Program'
make: *** No rule to make target `"/C/Program', needed by `callsite.o'. Stop.
Gem files will remain installed in C:/Program Files/Ruby191/lib/ruby/gems/1.9.1/gems/rcov-0.9.8 for inspection.
Results logged to C:/Program Files/Ruby191/lib/ruby/gems/1.9.1/gems/rcov-0.9.8/ext/rcovrt/gem_make.out
This output is now after installing DevKit - to the root Ruby folder.
Indeed, Gem is trying to compile the software for your OS (Windows, apparently).
If you are using the RubyInstaller (rather than the incomplete packages at http://ruby-lang.org), you should add the DevKit and you will get tools like make, gcc, etc. that will be able to compile many of the gems natively.
Otherwise, you should be able to use the Win32 binary version of the Rcov gem.
Sadly, the DevKit can't always compile every gem on Win32. But first, a question: did you follow Step 2 of the DevKit's installation instructions to edit the fstab file? If so, then the next best thing to do is email the RubyInstaller Google Group with details of the compilation problem.
I just tried the Win32 binary rcovrt.so from the Rcov site on my own Windows box, but it doesn't recognize as a valid Windows image, at least with my Ruby 1.9 installation... so figuring out how to make the DevKit compilation to work may be your best bet.
The gem you're trying to use needs to compile native extensions (code which is compiled per system), and for that, it's using a makefile. Have you tried installing make?
You are correct, it is using GNU make. One option is to install cygwin and install make (under the devel tree in cygwin setup).

Resources