学習を始めて3日目の新米です。
ページ推移の練習をしている際、rails sを起動すると、このようなエラーが出ました。
rail sを打つ前は、rails routesを何度か打ち、pathの前のコードを確認していました。
何度試しても、起動できず、次のステップに進めない為、大変困っています。
よろしくお願いいたします。
undefined local variable or method ' for #<ActionDispatch::Routing::Mapper:0x00007fcf342ce650 @set=#<ActionDispatch::Routing::RouteSet:0x00007fcf36d3cd88>, @draw_paths=[#<Pathname:/Users/aml22l/Desktop/geektwitter/config/routes>], @scope=#<ActionDispatch::Routing::Mapper::Scope:0x00007fcf342ce5b0 @hash={:path_names=>{:new=>"new", :edit=>"edit"}}, @parent=#<ActionDispatch::Routing::Mapper::Scope:0x00007fcf34275de8 @hash=nil, @parent=nil, @scope_level=nil>, @scope_level=nil>, @concerns={}> (NameError) from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/actionpack-6.1.6/lib/action_dispatch/routing/route_set.rb:427:in
instance_exec'
from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/actionpack-6.1.6/lib/action_dispatch/routing/route_set.rb:427:in eval_block' from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/actionpack-6.1.6/lib/action_dispatch/routing/route_set.rb:409:in
draw'
from /Users/aml22l/Desktop/geektwitter/config/routes.rb:1:in <main>' from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/bootsnap-1.12.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:39:in
load'
from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/bootsnap-1.12.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:39:in load' from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/railties-6.1.6/lib/rails/application/routes_reloader.rb:47:in
block in load_paths'
from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/railties-6.1.6/lib/rails/application/routes_reloader.rb:47:in each' from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/railties-6.1.6/lib/rails/application/routes_reloader.rb:47:in
load_paths'
from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/railties-6.1.6/lib/rails/application/routes_reloader.rb:21:in reload!' from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/railties-6.1.6/lib/rails/application/routes_reloader.rb:35:in
block in updater'
from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/activesupport-6.1.6/lib/active_support/file_update_checker.rb:83:in execute' from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/railties-6.1.6/lib/rails/application/routes_reloader.rb:10:in
execute'
from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/railties-6.1.6/lib/rails/application/finisher.rb:195:in block in <module:Finisher>' from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/railties-6.1.6/lib/rails/initializable.rb:32:in
instance_exec'
from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/railties-6.1.6/lib/rails/initializable.rb:32:in run' from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/railties-6.1.6/lib/rails/initializable.rb:61:in
block in run_initializers'
from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/3.0.0/tsort.rb:228:in block in tsort_each' from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/3.0.0/tsort.rb:350:in
block (2 levels) in each_strongly_connected_component'
from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/3.0.0/tsort.rb:431:in each_strongly_connected_component_from' from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/3.0.0/tsort.rb:349:in
block in each_strongly_connected_component'
from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/3.0.0/tsort.rb:347:in each' from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/3.0.0/tsort.rb:347:in
call'
from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/3.0.0/tsort.rb:347:in each_strongly_connected_component' from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/3.0.0/tsort.rb:226:in
tsort_each'
from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/3.0.0/tsort.rb:205:in tsort_each' from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/railties-6.1.6/lib/rails/initializable.rb:60:in
run_initializers'
from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/railties-6.1.6/lib/rails/application.rb:391:in initialize!' from /Users/aml22l/Desktop/geektwitter/config/environment.rb:5:in
<main>'
from config.ru:3:in require_relative' from config.ru:3:in
block in <main>'
from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/rack-2.2.3.1/lib/rack/builder.rb:116:in eval' from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/rack-2.2.3.1/lib/rack/builder.rb:116:in
new_from_string'
from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/rack-2.2.3.1/lib/rack/builder.rb:105:in load_file' from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/rack-2.2.3.1/lib/rack/builder.rb:66:in
parse_file'
from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/rack-2.2.3.1/lib/rack/server.rb:349:in build_app_and_options_from_config' from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/rack-2.2.3.1/lib/rack/server.rb:249:in
app'
from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/rack-2.2.3.1/lib/rack/server.rb:422:in wrapped_app' from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/railties-6.1.6/lib/rails/commands/server/server_command.rb:77:in
log_to_stdout'
from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/railties-6.1.6/lib/rails/commands/server/server_command.rb:37:in start' from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/railties-6.1.6/lib/rails/commands/server/server_command.rb:144:in
block in perform'
from internal:kernel:90:in tap' from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/railties-6.1.6/lib/rails/commands/server/server_command.rb:135:in
perform'
from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/command.rb:27:in run' from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in
invoke_command'
from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/thor-1.2.1/lib/thor.rb:392:in dispatch' from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/railties-6.1.6/lib/rails/command/base.rb:69:in
perform'
from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/railties-6.1.6/lib/rails/command.rb:48:in invoke' from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/railties-6.1.6/lib/rails/commands.rb:18:in
<main>'
from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/bootsnap-1.12.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in require' from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/bootsnap-1.12.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in
require'
from /Users/aml22l/Desktop/geektwitter/bin/rails:5:in <top (required)>' from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/spring-4.0.0/lib/spring/client/rails.rb:30:in
load'
from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/spring-4.0.0/lib/spring/client/rails.rb:30:in call' from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/spring-4.0.0/lib/spring/client/command.rb:7:in
call'
from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/spring-4.0.0/lib/spring/client.rb:30:in run' from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/spring-4.0.0/bin/spring:49:in
<top (required)>'
from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/spring-4.0.0/lib/spring/binstub.rb:11:in load' from /Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/spring-4.0.0/lib/spring/binstub.rb:11:in
<top (required)>'
from internal:/Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb:85:in require' from <internal:/Users/aml22l/.rbenv/versions/3.0.4/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in
require'
from /Users/aml22l/Desktop/geektwitter/bin/spring:10:in block in <top (required)>' from <internal:kernel>:90:in
tap'
from /Users/aml22l/Desktop/geektwitter/bin/spring:7:in <top (required)>' from bin/rails:2:in
load'
from bin/rails:2:in `<main>'

回答1件
あなたの回答
tips
プレビュー
下記のような回答は推奨されていません。
このような回答には修正を依頼しましょう。
また依頼した内容が修正された場合は、修正依頼を取り消すようにしましょう。