2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Ruby on Railsのyaml.h not found解決方法(Windows11)

Posted at

STEP 0

基本的なインストールは、こちらの記事を参考に

ただ、新規プロジェクト作成時にyaml.hが無いというような以下のようなエラーが出たので修正

C:/Ruby32-x64/lib/ruby/site_ruby/3.2.0/bundler/installer/parallel_installer.rb:123:in
`block in worker_pool'
  C:/Ruby32-x64/lib/ruby/site_ruby/3.2.0/bundler/worker.rb:62:in `apply_func'
C:/Ruby32-x64/lib/ruby/site_ruby/3.2.0/bundler/worker.rb:57:in `block in
process_queue'
  C:/Ruby32-x64/lib/ruby/site_ruby/3.2.0/bundler/worker.rb:54:in `loop'
  C:/Ruby32-x64/lib/ruby/site_ruby/3.2.0/bundler/worker.rb:54:in `process_queue'
C:/Ruby32-x64/lib/ruby/site_ruby/3.2.0/bundler/worker.rb:90:in `block (2
levels) in create_threads'

An error occurred while installing psych (5.1.2), and Bundler cannot continue.

In Gemfile:
  debug was resolved to 1.9.2, which depends on
    irb was resolved to 1.13.0, which depends on
      rdoc was resolved to 6.6.3.1, which depends on
        psych
         run  bundle lock --add-platform=x86_64-linux
Fetching gem metadata from https://rubygems.org/...........
Resolving dependencies...
Writing lockfile to C:/Users/username/Desktop/project/project/Gemfile.lock
         run  bundle binstubs bundler
Could not find importmap-rails-2.0.1, turbo-rails-2.0.5, stimulus-rails-1.3.3,
debug-1.9.2, web-console-4.2.1, irb-1.13.0, rdoc-6.6.3.1, psych-5.1.2 in cached
gems or installed locally
       rails  importmap:install
Could not find importmap-rails-2.0.1, turbo-rails-2.0.5, stimulus-rails-1.3.3, debug-1.9.2, web-console-4.2.1, irb-1.13.0, rdoc-6.6.3.1, psych-5.1.2 in cached gems or installed locally
Run `bundle install` to install missing gems.
       rails  turbo:install stimulus:install
Could not find importmap-rails-2.0.1, turbo-rails-2.0.5, stimulus-rails-1.3.3, debug-1.9.2, web-console-4.2.1, irb-1.13.0, rdoc-6.6.3.1, psych-5.1.2 in cached gems or installed locally
Run `bundle install` to install missing gems.

STEP1

以下からlibyamlのzipをダウンロードし、解凍

STEP2

以下のコマンドを実行

gem install psych --platform=ruby -- --with-libyaml-dir=[libyamlのディレクトリパス]

STEP3

インストールが完了したのでダウンロードしたzipファイルとそれを解凍したフォルダは削除してよし。
再度、プロジェクト作成、bundle installするとエラー吐かずに実行終了した。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?