RubyInstaller 2.2.1 and Rails - Rake cannot load Nokogiri

后端 未结 6 621
隐瞒了意图╮
隐瞒了意图╮ 2020-12-03 04:01

recently I installed Ruby 2.2.1 with the new RubyInstaller on Windows. To check whether everything was working I went into a rails app and ran bundle install wh

6条回答
  •  感动是毒
    2020-12-03 04:16

    You can try to use cross-compilled gem. For me works fine.

    1. Remove all versions of nokogiri installed previously

      gem uninstall nokogiri

    2. Download gem from https://github.com/paulgrant999/ruby-2.2.2-nokogiri-1.6.6.2-x86-x64-mingw32.gem

    3. Install using one of the next commands:

      For 64bit Ruby: gem install --local nokogiri-1.6.6.2-x64-mingw32.gem

      For 32bit Ruby: gem install --local nokogiri-1.6.6.2-x86-mingw32.gem

    4. Lock version of nokogiri i your Gemfile:

      gem 'nokogiri', '1.6.6.2'

提交回复
热议问题