#ターミナル上でrails sを入力しても、エラーが表示される。
以下がエラー文です。
dyld: Library not loaded: /Users//.rbenv/versions/2.5.1/lib/libruby.2.5.dylib/.rbenv/versions/2.5.1/bin/ruby
Referenced from: /Users/
Reason: image not found
zsh: abort rails s
##データ移行の際にユーザー名などを変更したのが原因かも...
旧Macから新Macへデータ移行する際に、ユーザー名やアカウント名を変更したが、それがエラーの原因になっているのかなと思います。(素人なりの考えですが)
エラーと関係がありそうな情報を調べて、以下のコードを入力したが解消出来なかった。
brew update
brew install rbenv
brew reinstall zsh && brew unlink zsh && brew link zsh
どなたかお助けください。
###現在のエラー状況
回答のとおり、ruby2.5.1をrbenvで再インストールしてから、以下のコードを入力すると、長いエラー文が出てきました。
rbenv install 2.5.1
rbenv rehash
bundle install
gem install msgpack
(エラー文)
Traceback (most recent call last):
36: from bin/rails:3:in <main>' 35: from bin/rails:3:in
load'
34: from /Users//projects/view_drill2/bin/spring:15:in <top (required)>' 33: from /Users//.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in
require'
32: from /Users//.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in require' 31: from /Users//.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/spring-2.1.0/lib/spring/binstub.rb:11:in
<top (required)>'
30: from /Users//.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/spring-2.1.0/lib/spring/binstub.rb:11:in load' 29: from /Users//.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/spring-2.1.0/bin/spring:49:in
<top (required)>'
28: from /Users//.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/spring-2.1.0/lib/spring/client.rb:30:in run' 27: from /Users//.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/spring-2.1.0/lib/spring/client/command.rb:7:in
call'
26: from /Users//.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/spring-2.1.0/lib/spring/client/rails.rb:28:in call' 25: from /Users//.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/spring-2.1.0/lib/spring/client/rails.rb:28:in
load'
24: from /Users//projects/view_drill2/bin/rails:8:in <top (required)>' 23: from /Users//projects/view_drill2/bin/rails:8:in
require_relative'
22: from /Users//projects/view_drill2/config/boot.rb:4:in <top (required)>' 21: from /Users//projects/view_drill2/config/boot.rb:4:in
require'
20: from /Users//.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/setup.rb:31:in <top (required)>' 19: from /Users//.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap.rb:31:in
setup'
18: from /Users//.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/compile_cache.rb:19:in setup' 17: from /Users//.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:49:in
require_relative'
16: from /Users//.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in require' 15: from /Users//.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:257:in
load_dependency'
14: from /Users//.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in block in require' 13: from /Users//.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in
require'
12: from /Users//.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in require_with_bootsnap_lfi' 11: from /Users//.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in
register'
10: from /Users//.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in block in require_with_bootsnap_lfi' 9: from /Users//.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in
require'
8: from /Users//.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/compile_cache/yaml.rb:2:in <top (required)>' 7: from /Users//.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in
require'
6: from /Users//.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:257:in load_dependency' 5: from /Users//.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in
block in require'
4: from /Users//.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in require' 3: from /Users//.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in
require_with_bootsnap_lfi'
2: from /Users//.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in register' 1: from /Users//.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in
block in require_with_bootsnap_lfi'
/Users//.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require': dlopen(/Users//.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/bootsnap.bundle, 9): Library not loaded: /Users//.rbenv/versions/2.5.1/lib/libruby.2.5.dylib (LoadError)
Referenced from: /Users//.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/bootsnap.bundle
Reason: image not found - /Users//.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/bootsnap.bundle
あなたの回答
tips
プレビュー