0
Help us understand the problem. What are the problem?

posted at

Unknown alias: default (Psych::BadAlias)でRailsが立ち上がらないとき

Rails6以降の立ち上げでrails sをしたとき

こんな感じで立ち上がらなかった

hogehoge sample_app4 % rails s
=> Booting Puma
=> Rails 7.0.3 application starting in development 
=> Run `bin/rails server --help` for more startup options
Exiting
/Users/hogehoge/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:430:in `visit_Psych_Nodes_Alias': Unknown alias: default (Psych::BadAlias)
        from /Users/hogehoge/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:30:in `visit'
        from /Users/hogehoge/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/visitor.rb:6:in `accept'
        from /Users/hogehoge/.rbenv/versions/3.1.1/lib/ruby/3.1.0/psych/visitors/to_ruby.rb:35:in `accept'
---

Unknown alias: default (Psych::BadAlias)を調べて見るとpsychが必要みたいなので

gem 'psych', '~> 3.1'

を追加bundel install

無事に立ち上がりました。

Register as a new user and use Qiita more conveniently

  1. You can follow users and tags
  2. you can stock useful information
  3. You can make editorial suggestions for articles
What you can do with signing up
0
Help us understand the problem. What are the problem?