I am trying to install Gitorious on Redhat 5. I am following these instructions: https://gitorious.org/gitorious/pages/Rhel_Installation
One of the steps is: rake db:create RAILS_ENV=production
That command fails with the foll error message:
[ gitorious ] sudo rake db:create RAILS_ENV=production
Could not find libdolt-0.33.14 in any of the sources
Run `bundle install` to install missing gems.
When I ran 'bundle install' it fails with:
0: makeup (0.4.4) from /usr/local/lib/ruby/gems/2.0.0/specifications/makeup-0.4.4.gemspec
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb
checking for gmake... yes
checking for cmake... yes
-- cmake .. -DBUILD_CLAR=OFF -DTHREADSAFE=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS=-fPIC
Package zlib was not found in the pkg-config search path.
Perhaps you should add the directory containing `zlib.pc'
to the PKG_CONFIG_PATH environment variable
Package 'zlib', required by 'libgit2', not found
-- /usr/bin/gmake
*** 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.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/ruby
--with-git2-dir
--without-git2-dir
--with-git2-include
--without-git2-include=${git2-dir}/include
--with-git2-lib
--without-git2-lib=${git2-dir}/
extconf.rb:16:in `sys': ERROR: '/usr/bin/gmake' failed (RuntimeError)
from extconf.rb:59:in `block (2 levels) in <main>'
from extconf.rb:54:in `chdir'
from extconf.rb:54:in `block in <main>'
from extconf.rb:51:in `chdir'
from extconf.rb:51:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /usr/local/lib/ruby/gems/2.0.0/bundler/gems/rugged-5f1b6d177132 for inspection.
Results logged to /usr/local/lib/ruby/gems/2.0.0/bundler/gems/extensions/x86_64-linux/2.0.0-static/rugged-0.19.0/gem_make.out
/usr/local/lib/ruby/site_ruby/2.0.0/rubygems/ext/builder.rb:89:in `run'
/usr/local/lib/ruby/site_ruby/2.0.0/rubygems/ext/ext_conf_builder.rb:37:in `block in build'
/usr/local/lib/ruby/2.0.0/tempfile.rb:324:in `open'
/usr/local/lib/ruby/site_ruby/2.0.0/rubygems/ext/ext_conf_builder.rb:17:in `build'
/usr/local/lib/ruby/site_ruby/2.0.0/rubygems/ext/builder.rb:161:in `block (2 levels) in build_extension'
/usr/local/lib/ruby/site_ruby/2.0.0/rubygems/ext/builder.rb:160:in `chdir'
/usr/local/lib/ruby/site_ruby/2.0.0/rubygems/ext/builder.rb:160:in `block in build_extension'
/usr/local/lib/ruby/site_ruby/2.0.0/rubygems/ext/builder.rb:159:in `synchronize'
/usr/local/lib/ruby/site_ruby/2.0.0/rubygems/ext/builder.rb:159:in `build_extension'
/usr/local/lib/ruby/site_ruby/2.0.0/rubygems/ext/builder.rb:198:in `block in build_extensions'
/usr/local/lib/ruby/site_ruby/2.0.0/rubygems/ext/builder.rb:195:in `each'
/usr/local/lib/ruby/site_ruby/2.0.0/rubygems/ext/builder.rb:195:in `build_extensions'
/usr/local/lib/ruby/site_ruby/2.0.0/rubygems/installer.rb:677:in `build_extensions'
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/source/path.rb:174:in `generate_bin'
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/source/git.rb:161:in `install'
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/installer.rb:111:in `block in install_gem_from_spec'
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/rubygems_integration.rb:150:in `with_build_args'
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/installer.rb:110:in `install_gem_from_spec'
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/installer.rb:265:in `block in install_sequentially'
/usr/local/lib/ruby/2.0.0/forwardable.rb:171:in `each'
/usr/local/lib/ruby/2.0.0/forwardable.rb:171:in `each'
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/installer.rb:264:in `install_sequentially'
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/installer.rb:97:in `run'
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/installer.rb:15:in `install'
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/cli.rb:255:in `install'
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/vendor/thor/command.rb:27:in `run'
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/vendor/thor/invocation.rb:121:in `invoke_command'
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/vendor/thor.rb:363:in `dispatch'
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/vendor/thor/base.rb:440:in `start'
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/cli.rb:10:in `start'
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/bin/bundle:20:in `block in <top (required)>'
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/friendly_errors.rb:5:in `with_friendly_errors'
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/bin/bundle:20:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
An error occurred while installing rugged (0.19.0), and Bundler cannot continue.
Make sure that `gem install rugged -v '0.19.0'` succeeds before bundling.
I did do 'sudo gem install rugged -v '0.19.0'` and it works:
[ gitorious ] sudo gem install rugged -v '0.19.0'
Building native extensions. This could take a while...
Successfully installed rugged-0.19.0
Parsing documentation for rugged-0.19.0
unable to convert "\x80" from ASCII-8BIT to UTF-8 for ../../extensions/x86_64-linux/2.0.0-static/rugged-0.19.0/rugged/rugged.so, skipping
unable to convert "\x80" from ASCII-8BIT to UTF-8 for lib/rugged/rugged.so, skipping
1 gem installed
I tried 'sudo bundle install --verbose' again but it fails the same way.
I then created a /usr/lib/pkgconfig/zlib.pc file and did a setenv of the PKG_CONGIF_PATH to add /usr/lib/pkgconfig.
zlib.pc:
prefix=/usr
exec_prefix=/usr
libdir=/usr/lib
includedir=/usr/include
sharedlibdir=/usr/lib
Name: zlib
Description: zlib compression library
Version: 1.2.3
Requires:
Libs: -L${libdir} -L${sharedlibdir} -lz
Cflags: -I${includedir}
I ran 'sudo bundle install --verbose' and it fails the same way...
The 'Gemfile' is in the main gitorious directory.
Any suggestions?
You're missing dependencies. I don't know the entirety of what you need, but based on libdolt and libgit2 you would need the following:
yum install python-devel libicu-devel zlib-devel
If I am not wrong, there were many changes made to rugged later on, and it caused some version problem with cmake.
Installing latest cmake version, fixed similar problem for me. Try:
yum install cmake
Related
I did a clean install of Mac OS Yosemite, but now Rails won't work properly.
When I try to do rails s it tells me to do bundle install.
I get this message after trying to run bundle install:
Errno::EACCES: Permission denied - /Users/giowong/rails_project/doctible_pre_treatment/vendor/bundle/ruby/2.0.0/gems/bcrypt-3.1.7/.gitignore
I did
sudo gem update --system
and
bundle install
When I do this, I'm getting this nasty stuff:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20141107-39214-1ds3j4x.rb extconf.rb
checking for ruby/util.h... *** 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.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:434:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:549:in `block in try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:502:in `with_werror'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:549:in `try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:1044:in `block in have_header'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:895:in `block in checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:340:in `block (2 levels) in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:310:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:340:in `block in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:310:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:336:in `postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:894:in `checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:1043:in `have_header'
from extconf.rb:14:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /Users/giowong/rails_project/doctible_pre_treatment/vendor/bundle/ruby/2.0.0/gems/bcrypt-3.1.7 for inspection.
Results logged to /Users/giowong/rails_project/doctible_pre_treatment/vendor/bundle/ruby/2.0.0/extensions/universal-darwin-14/2.0.0/bcrypt-3.1.7/gem_make.out
An error occurred while installing bcrypt (3.1.7), and Bundler cannot continue.
Make sure that `gem install bcrypt -v '3.1.7'` succeeds before bundling.
I've tried installing using
\curl -sSL https://get.rvm.io | bash -s stable --rails
but no luck.
I don't recommend using the default Ruby provided with OS X, so install RVM instead. You will also need to install the Xcode command line tools:
xcode-select --install # click install, not Get Xcode
Then verify if gcc is installed:
gcc --version
And only then run:
\curl -sSL https://get.rvm.io | bash -s stable --rails
I'm working on my first ruby on rails course, building an application. Below is the error I am getting in the terminal when running the bundle install command. I am trying to add the gem 'devise'. I have no idea how to get past this error. Thanks!
Installing bcrypt (3.1.7) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
checking for ruby/util.h... *** 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.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:506:in `try_cpp'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:931:in `block in have_header'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:930:in `have_header'
from extconf.rb:14:in `<main>'
Gem files will remain installed in /usr/local/rvm/gems/ruby-1.9.3-p194/gems/bcrypt-3.1.7 for inspection.
Results logged to /usr/local/rvm/gems/ruby-1.9.3-p194/gems/bcrypt-3.1.7/ext/mri/gem_make.out
An error occured while installing bcrypt (3.1.7), and Bundler cannot continue.
Make sure that `gem install bcrypt -v '3.1.7'` succeeds before bundling.
you missing gcc if you use homebrew
brew tap homebrew/dupes
then
brew install apple-gcc42
on linux centos/fedora:
yum install gcc
on linux ubuntu:
apt-get install build-essential
Please update if it helps you.
Ive encounterd error installing cocoapods. Im using OSX 10.9.2.
I got the error to install development tools first, So ive installed it, tried to install again and had the same error, tried also to reboot, still no help.
Any ideas? :)
sudo gem install cocoapods
Password:
/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/gem:4: warning: Insecure world writable dir /usr/local/rvm/gems/ruby-1.9.3-p194/bin in PATH, mode 042777
Building native extensions. This could take a while...
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
"/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby" -rubygems /usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/bin/rake RUBYARCHDIR=/usr/local/rvm/gems/ruby-1.9.3-p194/gems/xcodeproj-0.16.0/ext RUBYLIBDIR=/usr/local/rvm/gems/ruby-1.9.3-p194/gems/xcodeproj-0.16.0/ext
/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/rake/file_utils.rb:68: warning: Insecure world writable dir /usr/local/rvm/gems/ruby-1.9.3-p194/bin in PATH, mode 042777
checking for -std=c99 option to compiler... *** 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.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:381:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:491:in `block in try_compile'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:443:in `with_werror'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:491:in `try_compile'
from extconf.rb:24:in `block in <main>'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
from extconf.rb:23:in `<main>'
rake aborted!
Command failed with status (1): [/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/...]
Tasks: TOP => default => ext
(See full trace by running task with --trace)
Gem files will remain installed in /usr/local/rvm/gems/ruby-1.9.3-p194/gems/xcodeproj-0.16.0 for inspection.
Results logged to /usr/local/rvm/gems/ruby-1.9.3-p194/gems/xcodeproj-0.16.0/ext/xcodeproj/gem_make.out
If you don't yet have it, get homebrew by running:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Then install cocoapods using homebrew:
brew install cocoapods
When trying to install nokogiri, I get:
± gem install nokogiri -v '1.6.0'
Building native extensions. This could take a while...
/Users/Chintan/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/rubygems/ext/builder.rb:48: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
/Users/Chintan/.rvm/rubies/ruby-1.9.3-p327/bin/ruby extconf.rb
/Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/mini_portile-0.5.0/lib/mini_portile.rb:199: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777
Extracting libxml2-2.8.0.tar.gz into tmp/x86_64-apple-darwin11.4.0/ports/libxml2/2.8.0... OK
Running 'configure' for libxml2 2.8.0... ERROR, review 'tmp/x86_64-apple-darwin11.4.0/ports/libxml2/2.8.0/configure.log' to see what happened.
*** 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.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/Chintan/.rvm/rubies/ruby-1.9.3-p327/bin/ruby
/Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/mini_portile-0.5.0/lib/mini_portile.rb:235:in `block in execute': Failed to complete configure task (RuntimeError)
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/mini_portile-0.5.0/lib/mini_portile.rb:227:in `chdir'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/mini_portile-0.5.0/lib/mini_portile.rb:227:in `execute'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/mini_portile-0.5.0/lib/mini_portile.rb:57:in `configure'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/mini_portile-0.5.0/lib/mini_portile.rb:100:in `cook'
from extconf.rb:101:in `block in <main>'
from extconf.rb:119:in `call'
from extconf.rb:119:in `block in <main>'
from extconf.rb:109:in `tap'
from extconf.rb:109:in `<main>'
Gem files will remain installed in /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/nokogiri-1.6.0 for inspection.
Results logged to /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/nokogiri-1.6.0/ext/nokogiri/gem_make.out
Looks like the issue is with the C compiler, here's the contents of configure.log:
checking build system type... x86_64-apple-darwin12.2.1
checking host system type... x86_64-apple-darwin12.2.1
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/nokogiri-1.6.0/ext/nokogiri/tmp/x86_64-apple-darwin11.4.0/ports/libxml2/2.8.0/libxml2-2.8.0':
configure: error: C compiler cannot create executables
See `config.log' for more details
Update:
Re-installing my compiler lets me install nokogiri, but I can't start rails server:
/Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require': dlopen(/Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/rmagick-2.13.2/lib/RMagick2.bundle, 9): Library not loaded: /usr/local/lib/libMagickCore-Q16.7.dylib (LoadError)
Referenced from: /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/rmagick-2.13.2/lib/RMagick2.bundle
Reason: image not found - /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/rmagick-2.13.2/lib/RMagick2.bundle
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/rmagick-2.13.2/lib/RMagick.rb:11:in `<top (required)>'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/Chintan/Documents/Work/Aidin/config/initializers/imagemagick.rb:1:in `<top (required)>'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/zeus-0.13.3/lib/zeus/load_tracking.rb:50:in `load'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/zeus-0.13.3/lib/zeus/load_tracking.rb:50:in `load'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/zeus-0.13.3/lib/zeus/load_tracking.rb:43:in `load'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in `block in load'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in `load'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/railties-3.2.13/lib/rails/engine.rb:588:in `block (2 levels) in <class:Engine>'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/railties-3.2.13/lib/rails/engine.rb:587:in `each'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/railties-3.2.13/lib/rails/engine.rb:587:in `block in <class:Engine>'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `run'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/railties-3.2.13/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `each'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/railties-3.2.13/lib/rails/application.rb:136:in `initialize!'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/Chintan/Documents/Work/Aidin/config/environment.rb:5:in `<top (required)>'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
from /Users/Chintan/Documents/Work/Aidin/config.ru:3:in `block in <main>'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
from /Users/Chintan/Documents/Work/Aidin/config.ru:in `new'
from /Users/Chintan/Documents/Work/Aidin/config.ru:in `<main>'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/railties-3.2.13/lib/rails/commands/server.rb:46:in `app'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/railties-3.2.13/lib/rails/commands/server.rb:70:in `start'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/railties-3.2.13/lib/rails/commands.rb:55:in `block in <top (required)>'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
from /Users/Chintan/.rvm/gems/ruby-1.9.3-p327#aidin_development/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Last time I had this issue, the fix was to just re-install apple-gcc42, but that that doesn't seem to be the issue right now. Any ideas?
Looks like this issue has been already addressed: nokogiri will not install - ERROR: Failed to build gem native extension
Try
sudo apt-get install libxslt-dev libxml2-dev
You need libxslt and libxml2 to build nokogiri. And since you're on MacOS X, you need to install via MacPorts or Homebrew. For Homebrew, try:
brew install libxslt libxml2
homebrew 0.9
Apparently some people have had problems getting libiconv to install under homebrew 0.9 (see issue #442). Here’s what reportedly works:
brew install libxml2 libxslt
brew link libxml2 libxslt
Then install libiconv from source:
wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz
tar xvfz libiconv-1.13.1.tar.gz
cd libiconv-1.13.1
./configure --prefix=/usr/local/Cellar/libiconv/1.13.1
make
sudo make install
Then (finally) install nokogiri:
gem install nokogiri -- --with-xml2-include=/usr/local/Cellar/libxml2/2.7.8/include/libxml2 \
--with-xml2-lib=/usr/local/Cellar/libxml2/2.7.8/lib \
--with-xslt-dir=/usr/local/Cellar/libxslt/1.1.26 \
--with-iconv-include=/usr/local/Cellar/libiconv/1.13.1/include \
--with-iconv-lib=/usr/local/Cellar/libiconv/1.13.1/lib
This workaround worked for me: https://github.com/opscode-cookbooks/xml/issues/19
1) Add liblzma-dev and z-lib1g-dev
sudo apt-get install liblzma-dev zlib1g-dev
2) Install using those
sudo /opt/chef/embedded/bin/gem install nokogiri -q --no-rdoc --no-ri -v "1.6.5" -- --use-system-libraries --with-xml2-include=/usr/include/libxml2
Following this worked for me http://jasdeep.ca/2013/10/installing-nokogiri-fails-os-x-mavericks/
It was a Mavericks issue involving developer tools.
A more comprehensive cases are detailed on nokogiri website
For me, on MacOs, it worked like as it is sugested here:
brew install libxml2
# If installing directly
gem install nokogiri -- --use-system-libraries \
--with-xml2-include=$(brew --prefix libxml2)/include/libxml2
# If using Bundle
bundle config build.nokogiri --use-system-libraries \
--with-xml2-include=$(brew --prefix libxml2)/include/libxml2
bundle install
When working with this, be certain to use $(brew --prefix libxml2)
because it will use the correct location for your Homebrew install.
Here I am trying to fetch data from MS-SQL Server 2008 to my Rails application on Ubuntu 10. But I am unable to install tiny_tds. I follow the step given at github. But no response. Please guide me to setup correctly.
Used gem command :: gem install tiny_tds
This command as well :: gem install tiny_tds –with-freetds-include=/usr/local/include/freetds –with-freetds-lib=/usr/local/lib
Error :
Installing tiny_tds (0.4.5) with native extensions /home/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/rubygems/installer.rb:483:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/home/.rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb
looking for library directory /home/.rvm/gems/ruby-1.9.2-p180#rails3/lib ... no
looking for library directory /home/.rvm/gems/ruby-1.9.2-p180#rails3/lib/freetds ... no
looking for library directory /home/.rvm/gems/ruby-1.9.2-p180#global/lib ... no
looking for library directory /home/.rvm/gems/ruby-1.9.2-p180#global/lib/freetds ... no
looking for library directory /home/.rvm/rubies/ruby-1.9.2-p180/lib ... yes
checking for main() in -lsybdb... no
looking for library directory /home/.rvm/rubies/ruby-1.9.2-p180/lib/freetds ... no
looking for library directory /home/.rvm/lib ... yes
checking for main() in -lsybdb... no
looking for library directory /home/.rvm/lib/freetds ... no
looking for library directory /home/lib ... no
looking for library directory /home/lib/freetds ... no
looking for library directory /usr/local/lib ... yes
checking for main() in -lsybdb... no
looking for library directory /usr/local/lib/freetds ... no
looking for library directory /usr/lib ... yes
checking for main() in -lsybdb... no
-----
Can not find FreeTDS's db-lib or include directory.
-----
*** 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.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/home/.rvm/rubies/ruby-1.9.2-p180/bin/ruby
--enable-iconv
--disable-iconv
--enable-iconv
--disable-iconv
--with-freetds-dir
--without-freetds-dir
--with-freetds-include
--without-freetds-include=${freetds-dir}/include
--with-freetds-lib
--without-freetds-lib=${freetds-dir}/lib
--enable-lookup
--disable-lookup
--with-sybdblib
--without-sybdblib
--with-sybdblib
--without-sybdblib
--with-sybdblib
--without-sybdblib
--with-sybdblib
--without-sybdblib
looking for library directory /usr/lib/freetds ... no
looking for library directory /usr/local/ruby/lib ... no
looking for library directory /usr/local/ruby/lib/freetds ... no
Gem files will remain installed in /home/.rvm/gems/ruby-1.9.2-p180#rails3/gems/tiny_tds-0.4.5 for inspection.
Results logged to /home/.rvm/gems/ruby-1.9.2-p180#rails3/gems/tiny_tds-0.4.5/ext/tiny_tds/gem_make.out
from /home/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/rubygems/installer.rb:486:in `block in build_extensions'
from /home/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/rubygems/installer.rb:446:in `each'
from /home/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/rubygems/installer.rb:446:in `build_extensions'
from /home/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/rubygems/installer.rb:198:in `install'
from /home/.rvm/gems/ruby-1.9.2-p180#rails3/gems/bundler-1.0.15/lib/bundler/source.rb:101:in `block in install'
from /home/.rvm/gems/ruby-1.9.2-p180#rails3/gems/bundler-1.0.15/lib/bundler/rubygems_integration.rb:78:in `preserve_paths'
from /home/.rvm/gems/ruby-1.9.2-p180#rails3/gems/bundler-1.0.15/lib/bundler/source.rb:91:in `install'
from /home/.rvm/gems/ruby-1.9.2-p180#rails3/gems/bundler-1.0.15/lib/bundler/installer.rb:58:in `block (2 levels) in run'
from /home/.rvm/gems/ruby-1.9.2-p180#rails3/gems/bundler-1.0.15/lib/bundler/rubygems_integration.rb:93:in `with_build_args'
from /home/.rvm/gems/ruby-1.9.2-p180#rails3/gems/bundler-1.0.15/lib/bundler/installer.rb:57:in `block in run'
from /home/.rvm/gems/ruby-1.9.2-p180#rails3/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12:in `block in each'
from /home/.rvm/gems/ruby-1.9.2-p180#rails3/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12:in `each'
from /home/.rvm/gems/ruby-1.9.2-p180#rails3/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12:in `each'
from /home/.rvm/gems/ruby-1.9.2-p180#rails3/gems/bundler-1.0.15/lib/bundler/installer.rb:49:in `run'
from /home/.rvm/gems/ruby-1.9.2-p180#rails3/gems/bundler-1.0.15/lib/bundler/installer.rb:8:in `install'
from /home/.rvm/gems/ruby-1.9.2-p180#rails3/gems/bundler-1.0.15/lib/bundler/cli.rb:222:in `install'
from /home/.rvm/gems/ruby-1.9.2-p180#rails3/gems/bundler-1.0.15/lib/bundler/vendor/thor/task.rb:22:in `run'
from /home/.rvm/gems/ruby-1.9.2-p180#rails3/gems/bundler-1.0.15/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /home/.rvm/gems/ruby-1.9.2-p180#rails3/gems/bundler-1.0.15/lib/bundler/vendor/thor.rb:246:in `dispatch'
from /home/.rvm/gems/ruby-1.9.2-p180#rails3/gems/bundler-1.0.15/lib/bundler/vendor/thor/base.rb:389:in `start'
from /home/.rvm/gems/ruby-1.9.2-p180#rails3/gems/bundler-1.0.15/bin/bundle:13:in `<top (required)>'
from /home/.rvm/gems/ruby-1.9.2-p180#rails3/bin/bundle:19:in `load'
from /home/.rvm/gems/ruby-1.9.2-p180#rails3/bin/bundle:19:in `<main>'
Did you install freeTDS prior to install the gem?
sudo apt-get install freetds-dev
Then
gem install tiny_tds
The answer above is correct, this is just an additional note for those mac folks that prefer homebrew
It command is essentially the exact same:
brew install freetds
As ar3 says, the answer above is correct. For those on CentOS, the RPM is freetds-devel, not freetds-dev (in case you're as soft with sysadmin as I am).
yum install freetds-devel
For mac users first install freetds by gem install tiny_tds
then get the freetds path by ls /opt/homebrew/Cellar/freetds
my version is 1.3.10
then
gem install tiny_tds -- --with-freetds-dir=/opt/homebrew/Cellar/freetds/1.3.10
Try with this,
Download freetds from following link and install it
freetds download link
Install with following instructions:
cd /home/user/Downloads/
tar -zxvf freetds-1.00.23.tar.gz
Then
cd freetds-1.00.23/
./configure
make
sudo make install
After freetds installation complete, try with bundle install
This will solve freetds dependency issue.