nokogiri gem installation error

2020 April 6th Update: macOS Catalina 10.15 gem install nokogiri — –use-system-libraries=true –with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/libxml2/ macOS Mojave 10.14 gem install nokogiri — –use-system-libraries=true –with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/libxml2/ macOS High Sierra 10.13 gem install nokogiri — –use-system-libraries=true –with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/libxml2/ macOS Sierra 10.12: gem install nokogiri — –use-system-libraries=true –with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/libxml2/ OS X El Capitan 10.11 gem install nokogiri — –use-system-libraries=true –with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/libxml2/ Consider to add … Read more

How can I set a proxy server for gem?

For http/https proxy with or without authentication: Run one of the following commands in cmd.exe set http_proxy=http://your_proxy:your_port set http_proxy=http://username:password@your_proxy:your_port set https_proxy=https://your_proxy:your_port set https_proxy=https://username:password@your_proxy:your_port

How do I use gems with Ubuntu?

Where are my Gems? You can find where your gems are stored using the gem environment command. For example: chris@chris-laptop:~$ gem environment RubyGems Environment: – RUBYGEMS VERSION: 1.3.2 – RUBY VERSION: 1.8.7 (2008-08-11 patchlevel 72) [i486-linux] – INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8 – RUBY EXECUTABLE: /usr/bin/ruby1.8 – EXECUTABLE DIRECTORY: /usr/bin – RUBYGEMS PLATFORMS: – ruby – x86-linux … Read more

ERROR: While executing gem … (Errno::EPERM) Operation not permitted [duplicate]

I found the answer on SASS issues: https://github.com/sass/sass/issues/1768 Since OSX el Capitan there is a new security function that prevents you from modifying system files called Rootless. So you have 2 options: If you install gems on /usr/local/bin there will be no problem because rootless doesn’t affect this path. sudo gem install -n /usr/local/bin GEM_NAME_HERE

How do I display Ruby on Rails form validation error messages one at a time?

ActiveRecord stores validation errors in an array called errors. If you have a User model then you would access the validation errors in a given instance like so: @user = User.create[params[:user]] # create will automatically call validators if @user.errors.any? # If there are errors, do something # You can iterate through all messages by attribute … Read more

Convert HTML to word file ?

If you are using Rails: in initializers/mime_types.rb: Mime::Type.register ‘application/vnd.ms-word’, :msword in your controller: say you want to export show action: def show @item = Item.find params[:id] respond_to do |format| format.html # show.html.erb format.xml { render :xml => @item } format.msword { set_header(‘msword’, “#{@item.title}.doc”) } format.pdf do render :pdf => ‘Coming soon…’, :layout => false end … Read more

find_spec_for_exe’: can’t find gem bundler (>= 0.a) (Gem::GemNotFoundException)

The problem in my case is that the Gemfile.lock file had a BUNDLED_WITH version of 1.16.1 and gem install bundler installed version 2.0.1, so there was a version mismatch when looking to right the folder gem install bundler -v 1.16.1 fixed it Of course, you can also change your Gemfile.lock‘s BUNDLED_WITH with last bundler version … Read more