gem install nokogiri -v '1.6.8.1' fails
I tried @the_basterd's recommendation. That didn't work, but the reference was good—thank you the_basterd. What worked from that reference was:
brew install libxml2
bundle config build.nokogiri --use-system-libraries --with-xml2-include=/usr/local/opt/libxml2/include/libxml2
Reference: https://github.com/sparklemotion/nokogiri/issues/1483
Later postings at that ref said that what I posted above "is strongly recommended against by the Nokogiri."
brew unlink xz; bundle install; brew link xz
is preferred.
Nokogiri error install
Delete your path folder(if it shows) and your Gemfile.lock .
Then place this in your gem file
gem 'nokogiri', '~> 1.6', '>= 1.6.8.1'
After that run bundle install .Remove the nokogiri from your gemfile
Nokogiri 1.6.8 is installed but gives error for previous Nokogiri when running bundle install
I could not fix this issue. It was looping through upgrades and downgrades, so after much frustration I tried Ruby 2.6 that Redmine 4.2 claimed to be compatible, which still had issues. I downgraded to Ruby 2.3 and it worked, then I migrated my database according to the redmine.org documentation and almost everything is functional, and I got a feedback that it is much faster.
According to my experience, you will have your Redmine database still working so don't worry that it s the same version.
Failing to install Nokogiri gem
This works like a charm!
gem install nokogiri -- --use-system-libraries=true --with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/libxml2
https://stackoverflow.com/a/24511149
nokogiri gem installation error
Finally, the problem was caused by nokogiri itself by shipping it's own libxml2 that's incompatible with some systems.
So to install nokogiri I had to tell it that it should use the system libraries.
I installed it manually by:
gem install nokogiri -v 1.6.2.1 -- --use-system-libraries
And it worked well. Other answers didn't solve it.
Error while installing Nokogiri (1.6.7) on El Capitan
You should install xcode-select
packages first, then try installing nokogiri again. Try these commands,
xcode-select --install
then try
gem install nokogiri
with whatever Nokogiri version you want.
Nokogiri depends on multiple libraries like libxslt, libxml and zlib. Dev versions (including source) of these should be installed before installing Nokogiri in any Linux distribution. For OS X, the above command should work I guess.
The actual solution is in the comments below.
Related Topics
Rails Generate Has_Many Association
Activerecord Objects in Hashes Aren't Garbage Collected -- a Bug or a Sort of Caching Feature
What Is the Send() Method Used For
What Are the Ruby's Object#Taint and Object#Trust Methods
Ruby on Rails: Errors.Add_To_Base VS. Errors.Add
When Is It Better to Use a Struct Rather Than a Hash in Ruby
Ruby on Rails: What Reporting And/Or Charting Tools Are Available
How to Open Files Relative to Home Directory
Ruby Strftime: Month Without Leading Zero
How to Do Standard Deviation in Ruby
Respond_To' VS. 'Respond_To_Missing'
Rails: I Can't Call a Function in a Module in /Lib - What am I Doing Wrong
How to Check What Is Queued in Activejob Using Rspec
Array Attribute for Ruby Model