Unable to reinstall compass after upgrade to MacOS Sierra - ruby

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

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!

MacOS: Trying to update to Cocoapods 1.10.0

When I run sudo gem install cocoapods to update to the latest version, the terminal tells me to check the mkmf.log to check why the extension failed. This is what I get in the mkmf.log:
package configuration for libffi is not found
"xcrun clang -o conftest -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin19 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/backward -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -g -Os -pipe -DHAVE_GCC_ATOMIC_BUILTINS conftest.c -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib -L. -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.Internal.sdk/usr/local/lib -arch x86_64 -lruby.2.6 "
In file included from conftest.c:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby.h:33:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:24:10: fatal error: 'ruby/config.h' file not found
#include "ruby/config.h"
^~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:24:10: note: did not find header 'config.h' in framework 'ruby' (loaded from '/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks')
1 error generated.
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return 0;
6: }
/* end */

Jekyll setup on Github Pages, issues with bundle install

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

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

Having difficulty installing ruby-filemagic gem on new RHEL6 server

It appears to be looking for the libmagic.so.1 file. I have that file. It is located in /usr/lib64. I am not running this installation as the root user.
I am also using rvm and Bundler. This is the result of my "bundle" command, when it gets to the ruby-filemagic line in my Gemfile:
[server#mine ext]$ ruby extconf.rb --with-magiclib
checking for magic_open() in -ltrue... no
*** ERROR: missing required library to compile this module
*** 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.
UPDATE:
Here are the results of the mkmf.log:
have_library: checking for magic_open() in -ltrue... -------------------- no
"gcc -o conftest -I. -I/usr/local/rvm/rubies/ruby-1.8.7-p358/lib/ruby/1.8/x86_64-linux -I. -g -O2 -fPIC conftest.c -L. -L/usr/local/rvm/rubies/ruby-1.8.7-p358/lib -Wl,-R/usr/local/rvm/rubies/ruby-1.8.7-p358/lib -L. -rdynamic -Wl,-export-dynamic -lruby-static -ltrue -lrt -ldl -lcrypt -lm -lc"
conftest.c: In function ‘t’:
conftest.c:3: error: ‘magic_open’ undeclared (first use in this function)
conftest.c:3: error: (Each undeclared identifier is reported only once
conftest.c:3: error: for each function it appears in.)
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { void ((*volatile p)()); p = (void ((*)()))magic_open; return 0; }
/* end */
"gcc -o conftest -I. -I/usr/local/rvm/rubies/ruby-1.8.7-p358/lib/ruby/1.8/x86_64-linux -I. -g -O2 -fPIC conftest.c -L. -L/usr/local/rvm/rubies/ruby-1.8.7-p358/lib -Wl,-R/usr/local/rvm/rubies/ruby-1.8.7-p358/lib -L. -rdynamic -Wl,-export-dynamic -lruby-static -ltrue -lrt -ldl -lcrypt -lm -lc"
/usr/bin/ld: cannot find -ltrue
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { magic_open(); return 0; }
/* end */
I can't figure out what to do to make this work.
Had same problem on Ubuntu 12.04. Just installed libmagic-dev package through following command:
sudo apt-get install libmagic-dev
On a Mac, using homebrew:
sudo brew install libmagic
I needed to do:
yum install file-devel
That apparently contains the libmagic header files that the filemagic ruby gem required in order to compile. It worked like a champ after that.
I had the same problem on OpenSuse 11.3. This helped:
zypper install file-devel

Resources