today i failed to install jekyll,i follw the jeklly official website :
1.install RubyInstaller
2.command: ridk install
3.gem install jekyll bundler,it failed:
then it shows:
PS C:\Code\MyBlog> gem install jekyll
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
ERROR: Error installing jekyll:
ERROR: Failed to build gem native extension.
current directory: C:/Dev/Ruby31-x64/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/ext
C:/Dev/Ruby31-x64/bin/ruby.exe -I C:/Dev/Ruby31-x64/lib/ruby/3.1.0 -r ./siteconf20220426-15436-o23130.rb extconf.rb
creating Makefile
current directory: C:/Dev/Ruby31-x64/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/ext
make DESTDIR\= clean
bash.exe: warning: could not find /tmp, please create!
current directory: C:/Dev/Ruby31-x64/lib/ruby/gems/3.1.0/gems/sassc-2.4.0/ext
make DESTDIR\=
compiling ./libsass/src/ast.cpp
compiling ./libsass/src/ast2c.cpp
compiling ./libsass/src/ast_fwd_decl.cpp
compiling ./libsass/src/ast_sel_cmp.cpp
compiling ./libsass/src/ast_sel_super.cpp
compiling ./libsass/src/ast_sel_unify.cpp
compiling ./libsass/src/ast_sel_weave.cpp
compiling ./libsass/src/ast_selectors.cpp
compiling ./libsass/src/ast_supports.cpp
compiling ./libsass/src/ast_values.cpp
compiling ./libsass/src/backtrace.cpp
compiling ./libsass/src/base64vlq.cpp
compiling ./libsass/src/bind.cpp
compiling ./libsass/src/c2ast.cpp
compiling ./libsass/src/c99func.c
Assembler messages:
Error: can't open C:\Users\��������\AppData\Local\Temp\cc3iPW42.s for reading: Illegal byte sequence
make: *** [Makefile:246:c99func.o] error 1
make failed, exit code 2
Gem files will remain installed in C:/Dev/Ruby31-x64/lib/ruby/gems/3.1.0/gems/sassc-2.4.0 for inspection.
Results logged to C:/Dev/Ruby31-x64/lib/ruby/gems/3.1.0/extensions/x64-mingw-ucrt/3.1.0/sassc-2.4.0/gem_make.out
and i noticed that idont have file :c99func.o,but i dont know how to compile that c99func.c file..c file
Related
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.
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.
When I run gem install thin under Ruby 2.1.7 (ruby 2.1.7p400 (2015-08-18 revision 51632) [i386-mingw32]), I get following errors.
D:\dev\myapp>gem install thin
Building native extensions. This could take a while...
ERROR: Error installing thin:
ERROR: Failed to build gem native extension.
C:/Ruby21/bin/ruby.exe extconf.rb
[...]
compiling cmain.cpp
cmain.cpp: In function 'int evma_send_file_data_to_connection(uintptr_t, const c
har*)':
cmain.cpp:802:20: error: 'fstat' was not declared in this scope
if (fstat (Fd, &st)) {
^
make: *** [cmain.o] Error 1
make failed, exit code 2
How can I work around this error?
Full log is available here.
I believe this was a known bug in earlier versions of the ruby devkit. Unfortunately I cannot find a reference to the fix.
Install the latest devkit and try again, this should solve your problem.
I'm using Ruby 1.9.3 on Windows8-64bit. My Ruby installation is in C:\Ruby193 and the Devkit is in C:\DevKit
I followed the DevKit installation and it's a success.
Then the guide asks me to test it by running gem install json --platform=ruby which returns this error (looks similar as before having DevKit installed):
Note: This other question here told me to add the DevKit installation folder to Environment PATH, I did it but still got same error.
C:\Users\myname>gem install json --platform=ruby
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
C:/Ruby193/bin/ruby.exe extconf.rb
creating Makefile
make
generating generator-i386-mingw32.def
compiling generator.c
In file included from c:/Ruby193/include/ruby-1.9.1/ruby/ruby.h:1381:0,
from c:/Ruby193/include/ruby-1.9.1/ruby.h:32,
from ../fbuffer/fbuffer.h:5,
from generator.c:1:
c:/Ruby193/include/ruby-1.9.1/ruby/missing.h:41:8: error: redefinition of 'struc
t timespec'
In file included from c:\devkit\mingw\bin\../lib/gcc/i686-w64-mingw32/4.7.2/../.
./../../i686-w64-mingw32/include/process.h:12:0,
from c:/Ruby193/include/ruby-1.9.1/ruby/win32.h:62,
from c:/Ruby193/include/ruby-1.9.1/ruby/defines.h:223,
from c:/Ruby193/include/ruby-1.9.1/ruby/ruby.h:67,
from c:/Ruby193/include/ruby-1.9.1/ruby.h:32,
from ../fbuffer/fbuffer.h:5,
from generator.c:1:
c:\devkit\mingw\bin\../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw
32/include/sys/types.h:89:8: note: originally defined here
In file included from c:/Ruby193/include/ruby-1.9.1/ruby/ruby.h:1381:0,
from c:/Ruby193/include/ruby-1.9.1/ruby.h:32,
from ../fbuffer/fbuffer.h:5,
from generator.c:1:
c:/Ruby193/include/ruby-1.9.1/ruby/missing.h:48:8: error: redefinition of 'struc
t timezone'
In file included from c:/Ruby193/include/ruby-1.9.1/ruby/win32.h:63:0,
from c:/Ruby193/include/ruby-1.9.1/ruby/defines.h:223,
from c:/Ruby193/include/ruby-1.9.1/ruby/ruby.h:67,
from c:/Ruby193/include/ruby-1.9.1/ruby.h:32,
from ../fbuffer/fbuffer.h:5,
from generator.c:1:
c:\devkit\mingw\bin\../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw
32/include/time.h:260:8: note: originally defined here
make: *** [generator.o] Error 1
Any solution? Thanks
Sorry, I used the wrong DevKit.
For Ruby 1.9.3 and below, we should use DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe The mingw is for 2.0 and above.
It works great now.
When running the gem install qrscanner, I'm having the following error:
Building native extensions. This could take a while...
ERROR: Error installing qrscanner:
ERROR: Failed to build gem native extension.
/home/kasuka/.rvm/rubies/ruby-1.9.2-p320/bin/ruby extconf.rb
make
pwd ; cd zxing ; python scons/scons.py lib DEBUG=0 PIC=1
/home/kasuka/.rvm/gems/ruby-1.9.2-p320/gems/qrscanner-0.4.1/ext/qrscanner
scons: Reading SConscript files ...
scons: warning: Two different environments were specified for target magick/src/MagickBitmapSource.o,
but they appear to have the same action: $CXX -o $TARGET -c $CXXFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
However when i added sudo:
Building native extensions. This could take a while...
ERROR: Error installing qrscanner:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
extconf.rb:4: Use RbConfig instead of obsolete and deprecated Config.
make
pwd ; cd zxing ; python scons/scons.py lib DEBUG=0 PIC=1
/var/lib/gems/1.9.1/gems/qrscanner-0.4.1/ext/qrscanner
scons: Reading SConscript files ...
scons: warning: Two different environments were specified for target magick/src/MagickBitmapSource.o,
but they appear to have the same action: $CXX -o $TARGET -c $CXXFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
I'm using ruby 1.9.2 and is worth to mention that the extconf.rb file does not exist on neither of the location mentioned.
read the documentation of the gem at
https://github.com/andys/qrscanner
and install these dependencies before you install the gem.
Dependencies
------------
* Python (for ZXing build script)
* ImageMagick: libMagick++, libMagickWand, libMagickCore
* gcc, g++, libstd++
* Operating system with a PREFIX of "/usr".