前提・実現したいこと
プロゲートの
https://prog-8.com/docs/rails-env
を参考にMacでRuby on Railsの開発環境構築を行っているのですが、
$ rails s
とするとサーバが起動できず、困っております。
発生している問題・エラーメッセージ
[WARNING] Could not load command "rails/commands/server/server_command". Error: uninitialized constant URI::Generic.
/Users/UserName/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/active_support.rb:79:in block in load_missing_constant' /Users/UserName/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/active_support.rb:8:in
without_bootsnap_cache'
/Users/UserName/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/active_support.rb:79:in rescue in load_missing_constant' /Users/UserName/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/active_support.rb:58:in
load_missing_constant'
/Users/UserName/.rbenv/versions/2.5.0/lib/ruby/2.5.0/uri/ftp.rb:23:in <module:URI>' /Users/UserName/.rbenv/versions/2.5.0/lib/ruby/2.5.0/uri/ftp.rb:13:in
<top (required)>'
/Users/UserName/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in require' /Users/UserName/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in
block in require_with_bootsnap_lfi'
/Users/UserName/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in register' /Users/UserName/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in
require_with_bootsnap_lfi'
/Users/UserName/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in require' /Users/UserName/.rbenv/versions/2.5.0/lib/ruby/2.5.0/uri.rb:107:in
<top (required)>'
/Users/UserName/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in require' /Users/UserName/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in
block in require_with_bootsnap_lfi'
/Users/UserName/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in register' /Users/UserName/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in
require_with_bootsnap_lfi'
/Users/UserName/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in require' /Users/UserName/.rbenv/versions/2.5.0/lib/ruby/2.5.0/uri/rfc2396_parser.rb:13:in
<top (required)>'
/Users/UserName/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in require' /Users/UserName/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in
block in require_with_bootsnap_lfi'
/Users/UserName/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in register' /Users/UserName/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in
require_with_bootsnap_lfi'
試したこと
今年、2014年の中古のMacのPCを買い、Catalinaに入れ替えて、ほぼ初期の状態です。
タイムマシーンでrailsをインストールする前の状態に幾度か戻し、やり直しているのですが、うまく行きません。
railsのバージョンを変更してみたりしたのですが、同じ結果でした。
作業中に
Rails "5.2.3"
のみをインストールしたはずなのですが、
$ rails -v
をするといつの間にか
Rails "5.2.4.1"
となっていました。
補足情報(FW/ツールのバージョンなど)
ruby 2.5.0
rails 5.2.4.1
macOs Catalina 10.15.2
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。