Jekyll setup on Github Pages, issues with bundle install - ruby

Edit: I am using Mac OS 10.12.3
I've tried using rvm with ruby-2.4.1. Was trying to follow the steps on here: https://help.github.com/articles/setting-up-your-github-pages-site-locally-with-jekyll/
Here's my logs (when i try bundle install):
An error occurred while installing eventmachine (1.2.7), and Bundler
cannot continue.
Make sure that `gem install eventmachine -v '1.2.7' --source
'https://rubygems.org/'` succeeds before bundling. current directory:
/Users/mins/.rvm/gems/ruby-2.4.1/gems/eventmachine-1.2.7/ext
/Applications/MAMP/Library/bin/ruby -r ./siteconf20180816-33407-1kj3dfq.rb
extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
mkmf.log:
"clang -o conftest -I/Applications/MAMP/Library/include/ruby-2.3.0/x86_64-darwin13 -I/Applications/MAMP/Library/include/ruby-2.3.0/ruby/backward -I/Applications/MAMP/Library/include/ruby-2.3.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -pipe conftest.c -L. -L/Applications/MAMP/Library/lib -L. -fstack-protector -lruby-static -framework CoreFoundation -lpthread -ldl -lobjc "
ld: library not found for -lruby-static
clang: error: linker command failed with exit code 1 (use -v to see invocation)
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return 0;
6: }
/* end */
| pkg-config --libs openssl
=> "dyld: Symbol not found: __cg_jpeg_resync_to_restart\n"
=> " Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO\n"
=> " Expected in: /Applications/MAMP/Library/lib/libJPEG.dylib\n"
=> " in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO\n"

This blog post points out to "Conflict between dynamic linking priority in OSX?".
In particular, assuming you are on MacOS:
putting the following variable in my bash_profile:
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/usr/local/lib/
And/Or:
Solution is to delete some dlylibs in the /usr/local/lib directory and create symbolic links to related files /System/Library/Frameworks/ImageIO.framework/Resources/:
$ cd /usr/local/lib
$ rm libgif.dylib
$ ln -s /System/Library/Frameworks/ImageIO.framework/Resources/libGIF.dylib libGIF.dylib
$ rm libjpeg.dylib
$ ln -s /System/Library/Frameworks/ImageIO.framework/Resources/libJPEG.dylib libJPEG.dylib
$ rm libtiff.dylib
$ ln -s /System/Library/Frameworks/ImageIO.framework/Resources/libTIFF.dylib libTIFF.dylib
$ rm libpng.dylib
$ ln -s /System/Library/Frameworks/ImageIO.framework/Resources/libPng.dylib libPng.dylib

Related

shopify-cli-2.1.0.deb => new shopify-cli package pre-installation script subprocess returned error exit status 1

I am trying to install the Shopify-cli-2.1.0.deb , But I am receiving the error.
I already executed the command
sudo gem update --system 3.1.3
sudo apt-get install -y ruby-dev
but when I am trying to install the Shopify-cli-2.1.0.deb using the following command I am receiving a error:
``
**sudo apt install /home/daviamaral/Downloads/shopify-cli-2.1.0.deb**
To see why this extension failed to compile, please check the mkmf.log which can
be found here:
/var/lib/gems/2.7.0/extensions/x86_64-linux/2.7.0/ffi-1.15.3/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.7.0/gems/ffi-1.15.3 for inspe
ction.
Results logged to /var/lib/gems/2.7.0/extensions/x86_64-linux/2.7.0/ffi-1.15.3/g
em_make.out
dpkg: error processing archive /home/daviamaral/Downloads/shopify-cli-2.1.0.deb
(--unpack):
new shopify-cli package pre-installation script subprocess returned error exit
status 1
Errors were encountered while processing:
/home/daviamaral/Downloads/shopify-cli-2.1.0.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
when I am going to the /var/lib/gems/2.7.0/extensions/x86_64-linux/2.7.0/ffi-1.15.3/mkmf.log
"pkg-config --exists libffi"
package configuration for libffi is not found
"gcc -o conftest -I/usr/include/x86_64-linux-gnu/ruby-2.7.0 -I/usr/include/ruby-2.7.0/ruby/backward -I/usr/include/ruby-2.7.0 -I. -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/build/ruby2.7-2E2p8v/ruby2.7-2.7.0=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC conftest.c -L. -L/usr/lib/x86_64-linux-gnu -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fstack-protector-strong -rdynamic -Wl,-export-dynamic -lruby-2.7 -lm -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return !!argv[argc];
6: }
/* end */
After I wrote this question I rested In my thoughts and realized the problem was being shown in the log!
==> package configuration for libffi is not found
yeah, for me, it's just the gcc environment, so I tried
sudo apt-get install gcc
That worked for me in ubuntu!
I will keep the question here because could be a problem for another person in the future!

Unable to reinstall compass after upgrade to MacOS Sierra

I had compass working fine with El Capitan, but the compass command was unavailable after upgrading to Sierra, and now I am unable to reinstall compass. Here is the text of the error from mkmf.log:
Applications/MAMP/Library/include/ruby-2.3.0/ruby/backward - I/Applications/MAMP/Library/include/ruby-2.3.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -pipe conftest.c -L. -L/Applications/MAMP/Library/lib -L. -fstack-protector -lruby-static -framework CoreFoundation -lpthread -ldl -lobjc "
ld: library not found for -lruby-static
clang: error: linker command failed with exit code 1 (use -v to see invocation)
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return 0;
6: }
/* end */
I have the most current version of XCode installed. I have no idea what is causing this problem.
I resolved this problem by installing Ruby Version Manager:
\curl -sSL https://get.rvm.io | bash -s stable --ruby
source /Users/yourusername/.rvm/scripts/rvm
. . . and then reinstalling compass:
sudo gem install compass

Mac 10.8.4 failed to install any native ruby gem extension

I have updated xcode to 5.1 and install the command line tools from preference->downloads page.
But when I try to install ruby gems (e.g. sqlite3, nokogiri), it gives errors like this:
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
And then I checked the mkmf.log:
" -o conftest -I/Users/alun/.rvm/rubies/ruby-2.1.2/include/ruby-2.1.0/x86_64-darwin13.0 -I/Users/alun/.rvm/rubies/ruby-2.1.2/include/ruby-2.1.0/ruby/backward -I/Users/alun/.rvm/rubies/ruby-2.1.2/include/ruby-2.1.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -I/Users/travis/.sm/pkg/active/include -fPIC -mmacosx-version-min=10.7 -pipe -Wno-error=unused-command-line-argument-hard-error-in-future conftest.c -L. -L/Users/alun/.rvm/rubies/ruby-2.1.2/lib -lxml2 -arch x86_64 -lruby-static -framework CoreFoundation -lpthread -ldl -lobjc "
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return 0;
6: }
/* end */
I searched but didn't find similar mkmf.log
It seems the build command doesn't specify gcc or any other things.
Finally I've solved my problem, by reinstall xcode and command line tools, and then reinstall ruby with rvm

How to fix ranlib/libtool error when running make

I'm getting recurring errors when using make on Mac OS Mountain Lion v10.8.4.
I tried to install libev, and, after running ./configure, I ran make and got:
libtool: link: gcc -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -o .libs/libev.4.dylib .libs/ev.o .libs/event.o -O3 -install_name /usr/local/lib/libev.4.dylib -compatibility_version 5 -current_version 5.0 -Wl,-single_module
libtool: link: dsymutil .libs/libev.4.dylib || :
libtool: link: (cd ".libs" && rm -f "libev.dylib" && ln -s "libev.4.dylib" "libev.dylib")
libtool: link: ar cru .libs/libev.a ev.o event.o
ranlib: unrecognized option `-q'
ranlib: Try `ranlib --help' for more information.
ar: internal ranlib command failed
make[1]: *** [libev.la] Error 1
make: *** [all] Error 2
I see a pattern because when I run make when trying to install httpd
I get this error:
libtool: link: rm -fr .libs/libev.4.dylib .libs/libev.4.dylib.dSYM .libs/libev.a .libs/libev.dylib
libtool: link: gcc -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -o .libs/libev.4.dylib .libs/ev.o .libs/event.o -O3 -install_name /usr/local/lib/libev.4.dylib -compatibility_version 5 -current_version 5.0 -Wl,-single_module
libtool: link: dsymutil .libs/libev.4.dylib || :
libtool: link: (cd ".libs" && rm -f "libev.dylib" && ln -s "libev.4.dylib" "libev.dylib")
libtool: link: ar cru .libs/libev.a ev.o event.o
ranlib: unrecognized option `-q'
ranlib: Try `ranlib --help' for more information.
ar: internal ranlib command failed
make[1]: *** [libev.la] Error 1
make: *** [all] Error 2
It looks like I have an issue with ranlib but I'm not sure how to fix it.
I saw somewhere that I should reinstall my developer tools, so I did but it hasn't helped.
First the obvious actions: make sure you have the latest libev release, and Xcode is up to date. The configure system seems outdated, as it detects the (my) host system as i386-apple-darwin12.4.0 rather than x86_64-apple-darwin12.4.0. Though it still seemed to build.
If you have the autotools installed, e.g., autoconf-2.69, automake-1.13.3, and libtool-2.4.2 (which is typically installed as glibtool on OS X), you can run the included autoreconf command with: sh autogen.sh to refresh the configure system. It will issue a few warnings that can be ignored.
./configure CC="clang" CFLAGS="-pipe -W -Wall -O2 [-march=core2]"
Xcode -> Preferences -> Downloads -> Components :
check and install "Command Line Tools if you haven't already, which might be enough. If you still have a terminal open through the process, type the rehash command. Possibly you've done all this, but some Mac developers never leave the IDE.

trouble install ruby-opencv

I have tried to install ruby-opencv and I can't get it to work.
I am running fedora 15 with rvm using ruby 1.8.7
I have tried this fork as it seems most up to date:
https://github.com/ser1zw/ruby-opencv
I have installed the packages opencv and opencv-devel both of which are version 2.2
When I try to compile the native extensions by running:
ruby extconf.rb
I get the error:
>> check require headers...
checking for core/core_c.h... no
*** extconf.rb failed ***
The mkmf.log file provides this information:
have_header: checking for core/core_c.h... -------------------- no
"gcc -E -I. -I/home/derek/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/x86_64-linux -I. -I/usr
/include -I/usr/local/include -I/usr/local/include/opencv2 -g -O2 -fPIC conftest.c -o conftest.i"
conftest.c:1:25: fatal error: core/core_c.h: No such file or directory
compilation terminated.
checked program was:
/* begin */
1: #include <core/core_c.h>
/* end */
does anyone know how to fix this error?
Did you check where opencv-devel was installed?
This is from the github page:
ruby extconf.rb \
--with-opencv-lib=/opt/local/lib \
--with-opencv-include=/opt/local/include/opencv2
Notice the -I lines on your compilation message, they did not include those locations. So double-check where opencv-devel went to, and fix the locations with the --with-opencv flags.

Resources