Installing psych 5.1.2 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
... ...
An error occurred while installing psych (5.1.2), and Bundler cannot
continue.
In Gemfile:
debug was resolved to 1.9.1, which depends on
irb was resolved to 1.12.0, which depends on
rdoc was resolved to 6.6.2, which depends on
psych
出现错误, 无法启动rails s ,这时需要在项目Gemfile里 , 添加: gem “psych”, “~> 4” , 再run: bundle , 就可以run: rails s 了
liudezhi@Udizy weibo % bundle
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
Using rake 13.1.0
Using connection_pool 2.4.1
Using base64 0.2.0
Using bigdecimal 3.1.7
Using concurrent-ruby 1.2.3
Using drb 2.2.1
Using minitest 5.22.3
Using mutex_m 0.2.0
Using builder 3.2.4
Using erubi 1.12.0
Using racc 1.7.3
Using crass 1.0.6
Using rack 3.0.9.1
Using nio4r 2.7.0
Using websocket-extensions 0.1.5
Using marcel 1.0.4
Using zeitwerk 2.6.13
Using date 3.3.4
Using mini_mime 1.1.5
Using timeout 0.4.1
Using bundler 2.3.26
Using msgpack 1.7.2
Using public_suffix 5.0.4
Using stringio 3.1.0
Using regexp_parser 2.9.0
Using matrix 0.4.2
Using bindex 0.8.1
Using thor 1.3.1
Using error_highlight 0.6.0
Using webrick 1.8.1
Using io-console 0.7.2
Using rexml 3.2.6
Using rubyzip 2.3.2
Using i18n 1.14.4
Using websocket 1.2.10
Using tzinfo 2.0.6
Using rack-session 2.0.0
Using nokogiri 1.16.3 (x86_64-darwin)
Using sqlite3 1.7.3 (x86_64-darwin)
Using rack-test 2.1.0
Using sprockets 4.2.1
Using puma 6.4.2
Using bootsnap 1.18.3
Using websocket-driver 0.7.6
Using addressable 2.8.6
Using net-protocol 0.2.2
Using rackup 2.1.0
Using activesupport 7.1.3.2
Using reline 0.4.3
Using loofah 2.22.0
Using net-imap 0.4.10
Fetching psych 4.0.6 (was 5.1.2)
Using net-pop 0.1.2
Using xpath 3.2.0
Using rails-dom-testing 2.2.0
Using selenium-webdriver 4.18.1
Using net-smtp 0.4.0.1
Using globalid 1.2.1
Using activemodel 7.1.3.2
Using rails-html-sanitizer 1.6.0
Using capybara 3.40.0
Using mail 2.8.1
Using activejob 7.1.3.2
Using activerecord 7.1.3.2
Using actionview 7.1.3.2
Using actionpack 7.1.3.2
Using jbuilder 2.11.5
Using actioncable 7.1.3.2
Using activestorage 7.1.3.2
Using actionmailer 7.1.3.2
Using sprockets-rails 3.4.2
Using actionmailbox 7.1.3.2
Using actiontext 7.1.3.2
Installing psych 4.0.6 (was 5.1.2) with native extensions
Fetching rdoc 6.6.2
Installing rdoc 6.6.2
Fetching irb 1.12.0
Installing irb 1.12.0
Using railties 7.1.3.2
Fetching debug 1.9.1
Using rails 7.1.3.2
Fetching stimulus-rails 1.3.3
Fetching importmap-rails 2.0.1
Fetching turbo-rails 2.0.5
Installing debug 1.9.1 with native extensions
Installing stimulus-rails 1.3.3
Installing turbo-rails 2.0.5
Installing importmap-rails 2.0.1
Fetching web-console 4.2.1
Installing web-console 4.2.1
Bundle complete! 16 Gemfile dependencies, 82 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
liudezhi@Udizy weibo % rails s
=> Booting Puma
=> Rails 7.1.3.2 application starting in development
=> Run `bin/rails server --help` for more startup options
Puma starting in single mode...
* Puma version: 6.4.2 (ruby 3.1.4-p223) ("The Eagle of Durango")
* Min threads: 5
* Max threads: 5
* Environment: development
* PID: 46662
* Listening on http://127.0.0.1:3000
* Listening on http://[::1]:3000
Use Ctrl-C to stop