■参考画像
■iterms画面(文字列貼り付け)
hirokinagai@HirokinoMBP ~ % gem list
internal:/Users/hirokinagai/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb:85:in require': cannot load such file -- psych (LoadError) from <internal:/Users/hirokinagai/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in
require'
from /Users/hirokinagai/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems.rb:609:in load_yaml' from /Users/hirokinagai/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/config_file.rb:346:in
load_file'
from /Users/hirokinagai/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/config_file.rb:189:in initialize' from /Users/hirokinagai/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/gem_runner.rb:73:in
new'
from /Users/hirokinagai/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/gem_runner.rb:73:in do_configuration' from /Users/hirokinagai/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/gem_runner.rb:38:in
run'
from /Users/hirokinagai/.rbenv/versions/3.1.2/bin/gem:21:in <main>' hirokinagai@HirokinoMBP ~ % gem install rails -v 7.0.4 <internal:/Users/hirokinagai/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in
require': cannot load such file -- psych (LoadError)
from internal:/Users/hirokinagai/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb:85:in require' from /Users/hirokinagai/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems.rb:609:in
load_yaml'
from /Users/hirokinagai/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/config_file.rb:346:in load_file' from /Users/hirokinagai/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/config_file.rb:189:in
initialize'
from /Users/hirokinagai/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/gem_runner.rb:73:in new' from /Users/hirokinagai/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/gem_runner.rb:73:in
do_configuration'
from /Users/hirokinagai/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/gem_runner.rb:38:in run' from /Users/hirokinagai/.rbenv/versions/3.1.2/bin/gem:21:in
'
hirokinagai@HirokinoMBP ~ % ruby -v
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-darwin20]
hirokinagai@HirokinoMBP ~ % rails -v
rbenv: rails: command not found
hirokinagai@HirokinoMBP ~ % gem list
<internal:/Users/hirokinagai/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- psych (LoadError)
from <internal:/Users/hirokinagai/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from /Users/hirokinagai/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems.rb:609:in `load_yaml'
from /Users/hirokinagai/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/config_file.rb:346:in `load_file'
from /Users/hirokinagai/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/config_file.rb:189:in `initialize'
from /Users/hirokinagai/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/gem_runner.rb:73:in `new'
from /Users/hirokinagai/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/gem_runner.rb:73:in `do_configuration'
from /Users/hirokinagai/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/gem_runner.rb:38:in `run'
from /Users/hirokinagai/.rbenv/versions/3.1.2/bin/gem:21:in `<main>'
hirokinagai@HirokinoMBP ~ % gem install rails -v 7.0.4
<internal:/Users/hirokinagai/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- psych (LoadError)
from <internal:/Users/hirokinagai/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from /Users/hirokinagai/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems.rb:609:in `load_yaml'
from /Users/hirokinagai/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/config_file.rb:346:in `load_file'
from /Users/hirokinagai/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/config_file.rb:189:in `initialize'
from /Users/hirokinagai/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/gem_runner.rb:73:in `new'
from /Users/hirokinagai/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/gem_runner.rb:73:in `do_configuration'
from /Users/hirokinagai/.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/gem_runner.rb:38:in `run'
from /Users/hirokinagai/.rbenv/versions/3.1.2/bin/gem:21:in `<main>'
hirokinagai@HirokinoMBP ~ % ruby -v
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-darwin20]
hirokinagai@HirokinoMBP ~ % rails -v
rbenv: rails: command not found
The `rails' command exists in these Ruby versions:
2.7.6
hirokinagai@HirokinoMBP ~ % which ruby
/Users/hirokinagai/.rbenv/shims/ruby
hirokinagai@HirokinoMBP ~ % which rails
/Users/hirokinagai/.rbenv/shims/rails
hirokinagai@HirokinoMBP ~ % which gem
/Users/hirokinagai/.rbenv/shims/gem
hirokinagai@HirokinoMBP ~ % bundle install
Could not locate Gemfile
hirokinagai@HirokinoMBP ~ % bundle update
Could not locate Gemfile
hirokinagai@HirokinoMBP ~ %
The `rails' command exists in these Ruby versions:
2.7.6■参考画像
hirokinagai@HirokinoMBP ~ % which ruby
/Users/hirokinagai/.rbenv/shims/ruby
hirokinagai@HirokinoMBP ~ % which rails
/Users/hirokinagai/.rbenv/shims/rails
hirokinagai@HirokinoMBP ~ % which gem
/Users/hirokinagai/.rbenv/shims/gem
hirokinagai@HirokinoMBP ~ % bundle install
Could not locate Gemfile
hirokinagai@HirokinoMBP ~ % bundle update
Could not locate Gemfile
hirokinagai@HirokinoMBP ~ %