An error occurred while installing nokogiri (1.6.0), and Bundler cannot continue
I delete the Gemfile.lock
, then run bundle install
. Everything is ok! :)
libiconv is missing' error when installing Nokogiri on Cygwin
Eventually figured this out myself ... had to direct the installation to use the system's pre-installed dependencies rather than compiling them, and tell it where the libxml2 dev headers were located. This was succcessful for me:
gem install nokogiri -v '1.6.3.1' -- --use-system-libraries --with-xml2-include=/usr/include/libxml2
Why does installing Nokogiri on Mac OS fail with libiconv is missing?
I had the same issue. Unfortunately the "Installing Nokogiri" doesn't cover Iconv issues. Here's how I resolved the issue.
First install homebrew, it'll make your life easier. If you already have it installed, be sure to grab the latest formulae by updating like so:
brew update
Note: In OSX 10.9+ you may need to install xCode command tools to allow you to install libiconv.
xcode-select --install
then install a newer version of libiconv
brew install libiconv
then install your gem
gem install nokogiri -- --with-iconv-dir=/usr/local/Cellar/libiconv/1.14
Failed to gem install nokogiri in Fedora16
Finally got it work, here are the steps:
Download libiconv
wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.11.tar.gz
Extract files
tar -xvzf libiconv-1.11.tar.gz
Enter the directory
cd libiconv-1.11
Configure libiconv Library
./configure --prefix=/usr/local/libiconv
Compile libiconv
make CFLAGS="-O2 -fno-tree-dce -fno-optimize-sibling-calls"
(I have to add CFLAGS to make the compiling work.)Install libiconv
sudo make install
Install nokogiri
CFLAGS="-O2 -fno-tree-dce -fno-optimize-sibling-calls" gem install nokogiri -- --with-iconv-dir=/usr/local/libiconv --with-iconv-lib=/usr/local/libiconv/lib --with-iconv-include=/usr/local/libiconv/include
Voila, it shows the success message!
Related Topics
Make User-Inputted Url into External Link in Rails
Empty Strings at the Beginning and End of Split
How Does Sinatra Define and Invoke the Get Method
Permanently Switching User in Capistrano 3 (Separate Authorization & Deploy)
Ruby Getting Deeply Nested JSON API Data
Wicked_Pdf Is Not Rendering Header
How to HTML_Escape Text Data in a Sinatra App
How to Dynamically Create Instance Methods at Runtime
Ruby Popen3 -- How to Repeatedly Write to Stdin & Read Stdout Without Re-Opening Process
When Is the Do Keyword Required in Ruby
Assign to an Array and Replace Emerged Nil Values
How to Recursively Flatten a Yaml File into a JSON Object Where Keys Are Dot Separated Strings
Gem Install JSON Fails with Redifinition of Struct Timezone/Timespec