How to correct a Load Error of Nokogiri using Ruby on Rails?

Viewed 599

I am quite sure I have exhausted every other resource trying to figure out why I keep getting a load error. There is something about nokogiri, bootsnap and spring that keeps coming up . I am using ruby on rails and when I try to start the server or console to do anything I get this error which I do not understand how to follow. I removed parts of the error message bc it is just too long for a post.

Traceback (most recent call last):
        106: from bin/rails:2:in `<main>'
        105: from bin/rails:2:in `load'
        104: ...
 could not use '/Users/allisonperry/.rvm/gems/ruby-2.6.3/gems/nokogiri-1.11.1-arm64-darwin/lib/nokogiri/2.6/nokogiri.bundle' 
because it is not a compatible arch - /Users/allisonperry/.rvm/gems/ruby-2.6.3/gems/nokogiri-1.11.1-arm64-darwin/lib/nokogiri/2.6/nokogiri.bundle (LoadError)

Gemfile...

ruby '2.6.3'
gem 'rails', '~> 6.1.2', '>= 6.1.2.1'gem 'sqlite3', '~> 1.4'
gem 'puma', '~> 5.0'
gem 'sass-rails', '>= 6'
gem 'webpacker', '~> 5.0'
gem 'turbolinks', '~> 5'
gem 'jbuilder', '~> 2.7'
gem 'redis', '~> 4.0'
gem 'bcrypt', '~> 3.1.7'
gem 'image_processing', '~> 1.2'
gem 'bootsnap', require: false
gem 'nokogiri'
group :development, :test do
  gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end
group :development do
  gem 'web-console', '>= 4.1.0'
  gem 'rack-mini-profiler', '~> 2.0'
  gem 'listen', '~> 3.3'
  gem 'spring'
end

group :test do
  gem 'capybara', '>= 3.26'
  gem 'selenium-webdriver'
  gem 'webdrivers'
end

gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

This in on mac OS big sur 11.1.

I have tried SOOOO MUCH and nothing works.

1 Answers

Looks like you installed an arm64 version and it is not compatible with your device.

Related