Сервер Rails и пакет не работают - PullRequest
0 голосов
/ 31 января 2019

Итак, начинающий самозабвенный рельс нуждается в некоторой помощи!

Mac OS Mojave 10.14.3

Я вернулся, чтобы продолжить работу над каким-то личным проектом, в котором я работаюrails и первым делом сначала запустите сервер rails командой rails s и получите в терминале следующую ошибку / вывод:

Ignoring bcrypt-3.1.11 because its extensions are not built.  Try: gem pristine bcrypt --version 3.1.11
Ignoring bindex-0.5.0 because its extensions are not built.  Try: gem pristine bindex --version 0.5.0
Ignoring byebug-10.0.2 because its extensions are not built.  Try: gem pristine byebug --version 10.0.2
Ignoring ffi-1.9.23 because its extensions are not built.  Try: gem pristine ffi --version 1.9.23
Ignoring mysql2-0.5.2 because its extensions are not built.  Try: gem pristine mysql2 --version 0.5.2
Ignoring mysql2-0.4.10 because its extensions are not built.  Try: gem pristine mysql2 --version 0.4.10
Ignoring nio4r-2.3.1 because its extensions are not built.  Try: gem pristine nio4r --version 2.3.1
Ignoring nio4r-2.3.0 because its extensions are not built.  Try: gem pristine nio4r --version 2.3.0
Ignoring nokogiri-1.8.4 because its extensions are not built.  Try: gem pristine nokogiri --version 1.8.4
Ignoring puma-3.11.4 because its extensions are not built.  Try: gem pristine puma --version 3.11.4
Ignoring bcrypt-3.1.11 because its extensions are not built.  Try: gem pristine bcrypt --version 3.1.11
Ignoring bindex-0.5.0 because its extensions are not built.  Try: gem pristine bindex --version 0.5.0
Ignoring byebug-10.0.2 because its extensions are not built.  Try: gem pristine byebug --version 10.0.2
Could not find nokogiri-1.8.2 in any of the sources
Run `bundle install` to install missing gems.

После запуска bundle install я получаю следующий вывод:

Ignoring bcrypt-3.1.11 because its extensions are not built.  Try: gem pristine bcrypt --version 3.1.11
Ignoring bindex-0.5.0 because its extensions are not built.  Try: gem pristine bindex --version 0.5.0
Ignoring byebug-10.0.2 because its extensions are not built.  Try: gem pristine byebug --version 10.0.2
Ignoring ffi-1.9.23 because its extensions are not built.  Try: gem pristine ffi --version 1.9.23
Ignoring mysql2-0.5.2 because its extensions are not built.  Try: gem pristine mysql2 --version 0.5.2
Ignoring mysql2-0.4.10 because its extensions are not built.  Try: gem pristine mysql2 --version 0.4.10
Ignoring nio4r-2.3.1 because its extensions are not built.  Try: gem pristine nio4r --version 2.3.1
Ignoring nio4r-2.3.0 because its extensions are not built.  Try: gem pristine nio4r --version 2.3.0
Ignoring nokogiri-1.8.4 because its extensions are not built.  Try: gem pristine nokogiri --version 1.8.4
Ignoring puma-3.11.4 because its extensions are not built.  Try: gem pristine puma --version 3.11.4
Ignoring websocket-driver-0.6.5 because its extensions are not built.  Try: gem pristine websocket-driver --version 0.6.5
Fetching gem metadata from https://rubygems.org/........
Using rake 12.3.1
Using concurrent-ruby 1.0.5
Using i18n 1.0.1
Using minitest 5.11.3
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using activesupport 5.1.6
Using builder 3.2.3
Using erubi 1.7.1
Using mini_portile2 2.3.0
Fetching nokogiri 1.8.2
Installing nokogiri 1.8.2 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /Users/USER/Desktop/Immunophenotyping/vendor/bundle/ruby/2.3.0/gems/nokogiri-1.8.2/ext/nokogiri
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20190131-45165-drnzr3.rb extconf.rb
--use-system-libraries
mkmf.rb can't find header files for ruby at
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /Users/USER/Desktop/Immunophenotyping/vendor/bundle/ruby/2.3.0/gems/nokogiri-1.8.2 for
inspection.
Results logged to
/Users/USER/Desktop/Immunophenotyping/vendor/bundle/ruby/2.3.0/extensions/universal-darwin-18/2.3.0/nokogiri-1.8.2/gem_make.out

An error occurred while installing nokogiri (1.8.2), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.8.2' --source 'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  rails was resolved to 5.1.6, which depends on
    actioncable was resolved to 5.1.6, which depends on
      actionpack was resolved to 5.1.6, which depends on
        actionview was resolved to 5.1.6, which depends on
          rails-dom-testing was resolved to 2.0.3, which depends on
            nokogiri

Я немного растерялся относительно того, что не так, поскольку, когда я в последний раз работал над этим проектом, у меня не было ни одной из этих проблем.

После включения и запуска gem install nokogiri -v '1.8.2' --source 'https://rubygems.org/' возвращает ошибку прав доступа.

Извините за стену текста, любая помощь очень ценится !!

1 Ответ

0 голосов
/ 31 января 2019

nokogiri 1.8.2 имеет проблемы с созданием собственных расширений на последних macOS.Вам необходимо обновить его до последней версии (> = 1.10.0), используя bundle update nokogiri

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...