Why can't I install json -v '1.8.3' on Windows 10? - json

When trying to install this gem, I receive the following:
Temporarily enhancing path to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension
C:/Ruby22-x64/bin/ruby.exe -r ./siteconf20161103-12844-13cqnmb.rb extconf.rb creating Makefile
make "DESTDIR=" clean
'make' is not recognized as an internal or external command, operable program, or batch file.
make "DESTDIR="
'make is not recognized as an internal or external command, operable program, or batch file.
make failed, exit code 1
Gem files will remain installed in C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/json-1.8.3 for inspection.
Results logged to C:/Ruby22-x64/lib/ruby/gems/2.2.0/extensions/x64-mingw32/2.2.0/json-1.8.3/gem_make.out
The gem_make.out file is not in that folder. This is the last gem I need to install. What do I need to do to resolve this?

Related

Fedora Arm pkg-config file not found error (armv7hl... should be armv7hnl...)

I'm trying to compile a cmake project on a RasberryPi with Fedora Arm 36 and in cmake I use pkg-config. It is correctly installed but I get this error:
/usr/bin/pkg-config: line 8: /usr/bin/armv7hnl-redhat-linux-gnueabi-pkg-config: No such file or directory
In the /usr/bin directory there is a file called armv7hl-redhat-linux-gnueabi-pkg-config (missing n in armv7hnl) is this a bug?
What can I do?
Edit
I've reinstalled pkg-config but still the same error.
/usr/bin/pkg-config is just a bash script that calls the appropriate executable and so I hard coded the one previously mentioned, I don't get an error but pkg-config can't find gtkmm-4.0 which is installed.

Installing gem json 2.2.0 failed - windows

I got an error trying to install gem json 2.2.0 to my project, so I look for many sites and tutorials but nothing help me with windows.
Please see the problem below:
Fetching json 2.2.0
Installing json 2.2.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/json-2.2.0/ext/json/ext/generator
C:/Ruby24-x64/bin/ruby.exe -I C:/Ruby24-x64/lib/ruby/site_ruby/2.4.0 -r
./siteconf20190412-3460-119pn5l.rb extconf.rb
creating Makefile
current directory:
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/json-2.2.0/ext/json/ext/generator
make "DESTDIR=" clean
current directory:
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/json-2.2.0/ext/json/ext/generator
make "DESTDIR="
make failedNo such file or directory - make "DESTDIR="
Gem files will remain installed in
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/json-2.2.0 for inspection.
Results logged to
C:/Ruby24-x64/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/json-2.2.0/gem_make.out
An error occurred while installing json (2.2.0), and Bundler cannot continue.
Make sure that `gem install json -v '2.2.0' --source 'https://rubygems.org/'`
succeeds before bundling.
In Gemfile:
calabash-android was resolved to 0.9.8, which depends on
luffa was resolved to 2.1.0, which depends on
json
For ubuntu the solution was: install libgmp3-dev.
For macOS the solution was: use XCode
But I found nothing for windows. Should be a solution to use RVM? If yes, how can I install it on Windows?
I really appreciate your help!

Dependency Error: Yikes! It looks like you don't have _plugins/lunrjs/jekyll_lunr_js_search.rb or one of its dependencies installed

When compiling Jekyll project with plugin jekyll_lunr_js_search always getting following error in windows. However it compiles on gitlabci.
Dependency Error: Yikes! It looks like you don't have D:/myproject/_plugins/lunrjs/jekyll_lunr_js_search.rb or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. The full error message from Ruby is: 'cannot load such file -- v8' If you run into trouble, you can find helpful resources at https://jekyllrb.com/help/!
Upon using gem install jekyll-lunr-js-search following error:
C:\MyProj>gem install jekyll-lunr-js-search
Fetching: json-2.0.3.gem (100%)
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
Successfully installed json-2.0.3
Fetching: ref-2.0.0.gem (100%)
Successfully installed ref-2.0.0
Fetching: libv8-3.16.14.19.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing jekyll-lunr-js-search:
ERROR: Failed to build gem native extension.
current directory: C:/APPs/Ruby23-x64/lib/ruby/gems/2.3.0/gems/libv8-3.16.14.19/ext/libv8
C:/APPs/Ruby23-x64/bin/ruby.exe -r ./siteconf20170310-14120-1y669dw.rb extconf.rb
creating Makefile
The system cannot find the path specified.
C:/APPs/Ruby23-x64/lib/ruby/gems/2.3.0/gems/libv8-3.16.14.19/ext/libv8/builder.rb:86:in `setup_python!': libv8 requires python 2 to be installed in order to build, but it is currently 3.4.4 (RuntimeError)
from C:/APPs/Ruby23-x64/lib/ruby/gems/2.3.0/gems/libv8-3.16.14.19/ext/libv8/builder.rb:53:in `build_libv8!'
from C:/APPs/Ruby23-x64/lib/ruby/gems/2.3.0/gems/libv8-3.16.14.19/ext/libv8/location.rb:24:in `install!'
from extconf.rb:7:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in C:/APPs/Ruby23-x64/lib/ruby/gems/2.3.0/gems/libv8-3.16.14.19 for inspection.
Results logged to C:/APPs/Ruby23-x64/lib/ruby/gems/2.3.0/extensions/x64-mingw32/2.3.0/libv8-3.16.14.19/gem_make.out
** FILE CONTENTS (gem_make.out)**
current directory: C:/APPs/Ruby23-x64/lib/ruby/gems/2.3.0/gems/libv8-3.16.14.19/ext/libv8
C:/APPs/Ruby23-x64/bin/ruby.exe -r ./siteconf20170310-14120-1y669dw.rb extconf.rb
creating Makefile
The system cannot find the path specified.
C:/APPs/Ruby23-x64/lib/ruby/gems/2.3.0/gems/libv8-3.16.14.19/ext/libv8/builder.rb:86:in `setup_python!': libv8 requires python 2 to be installed in order to build, but it is currently 3.4.4 (RuntimeError)
from C:/APPs/Ruby23-x64/lib/ruby/gems/2.3.0/gems/libv8-3.16.14.19/ext/libv8/builder.rb:53:in `build_libv8!'
from C:/APPs/Ruby23-x64/lib/ruby/gems/2.3.0/gems/libv8-3.16.14.19/ext/libv8/location.rb:24:in `install!'
from extconf.rb:7:in `<main>'
extconf failed, exit code 1
NOTE:
I've both python v2 and v3 installed and working fine. Tested python shell using py -2 output follows:
C:\>py -2
Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
If you look into the lib directory, you'll see that the ruby file is jekyll-lunr-js-search.rb instead of jekyll_lunr_js_search.rb. Moreover, it is also available as a Rubygem package.
Simply add the gem to the :jekyll_plugins group in your Gemfile, run bundle install and proceed building / serving with Jekyll.

Can't install json (Ruby doesn't work)

windows 10. ruby 2.2.4. I've tried all the devkit stuff and whatever to fix this. I've looked stuff up for hours and hours with no success. When I try to bundle it doesn't install json. When I try to install json it says
"Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
C:/Ruby22-x64/bin/ruby.exe -r ./siteconf20160303-4132-alefq2.rb extconf.rb
creating Makefile
make "DESTDIR=" clean
'make' is not recognized as an internal or external command,
operable program or batch file.
make "DESTDIR="
'make' is not recognized as an internal or external command,
operable program or batch file.
make failed, exit code 1
Gem files will remain installed in C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/json-1.8.3 for inspection.
Results logged to C:/Ruby22-x64/lib/ruby/gems/2.2.0/extensions/x64-mingw32/2.2.0/json-1.8.3/gem_make.out"
I was facing the same problem. The Gemfile.lock in the repo I cloned had a json version older than the one I had already installed. I did not manage to uninstall the newer version, but I did replace the old version number in the Gemfile.lock with the new one and it seems to work now.
You should run the devkit installation scripts.
In particular, pay attention to devkitvars.bat.

Sphinx 2.0.4 Install Error with MAMP 2.0: Can't Find MySQL Headers

Developing locally in MAMP and need Sphinx to work with MAMP's MySQL. Basically hitting a dead end during $ sudo make.
MAMP installs without some necessary resources for Sphinx integration, mainly a mysql lib directory and an include directory filled with C header source files. These were downloaded and installed successfully (using CMake) into the following directories:
/Applications/MAMP/Library/include/mysql
/Applications/MAMP/Library/lib/mysql
After unzipping Sphinx and running:
sudo ./configure --prefix=/usr/local/sphinx --with-libstemmer --with-mysql=/Applications/MAMP/Library
I got:
******************************************************************************
ERROR: cannot find MySQL include files.
Check that you do have MySQL include files installed.
The package name is typically 'mysql-devel'.
If include files are installed on your system, but you are still getting
this message, you should do one of the following:
1) either specify includes location explicitly, using --with-mysql-includes;
2) or specify MySQL installation root location explicitly, using --with-mysql;
3) or make sure that the path to 'mysql_config' program is listed in
Changing the ./configure command to:
sudo ./configure --prefix=/usr/local/sphinx--with-libstemmer --with-mysql-includes /Applications/MAMP/Library/include --with-mysql-libs /Applications/MAMP/Library/lib
throws the following on the outset, but regardless results in a successful configuration:
configure: WARNING: you should use --build, --host, --target
configure: WARNING: invalid host type: /Applications/MAMP/Library/include
configure: WARNING: you should use --build, --host, --target
configure: WARNING: invalid host type: /Applications/MAMP/Library/lib
The log also has the following line, (which I think is relevant in a sec):
checking MySQL include files... -Iyes
Now, continuing, $ sudo make throws the following:
Making all in src
/bin/sh svnxrev.sh ..
make all-am
g++ -DHAVE_CONFIG_H -I. -I../config -DSYSCONFDIR="\"/usr/local/sphinx--with-libstemmer/etc\"" -DDATADIR="\"/usr/local/sphinx--with-libstemmer/var/data\"" -I/usr/local/include -Iyes -Wall -g -D_FILE_OFFSET_BITS=64 -O3 -DNDEBUG -MT sphinx.o -MD -MP -MF .deps/sphinx.Tpo -c -o sphinx.o sphinx.cpp
In file included from sphinx.cpp:16:
sphinx.h:64:19: error: mysql.h: No such file or directory
... //whole bunch of errors follow, resulting from the above
So, I know mysql.h exists in my includes file, I think I have all necessary binaries as well, and the configuration seems to see the include files so I'm tearing out my hair a bit. I'm hoping this is a simple path problem, or a syntax error on my part with the ./configure attribute since this is my first time compiling and installing from the command line.
Thanks.
Sphinx's ./configure uses an unknown default value for --with-mysql, which is enabled by default, which could make you think calling it is not necessary.
To get Sphinx to work with MAMP's varyingly distributed MySQL files, make sure to use each of the following attributes in your ./configure command, specifying direct paths for each:
--with-mysql= // root mysql app
--with-includes= // path to mysql header includes
--with-mysql-libs= // path to libmysqlclient.dylib files
The final command that worked for me:
./configure --prefix=/usr/local/sphinx --with-libstemmer --with-mysql=/Applications/MAMP/Library --with-mysql-includes=/Applications/MAMP/Library/include/mysql --with-mysql-libs=/Applications/MAMP/Library/lib/mysql
--prefix is your preferred install directory in usr/local and --libstemmer adds Snowball's extended stemming functionality (if you downloaded it).
If this runs without error, just make and make install and you're good to go.
Also note that there's a configure error log in the uncompressed Sphinx directory that's easy to overlook. Didn't help in this scenario, but could be really useful to others if you're having problems.