codetoprogramsomethingmeaningful
Joined
Activity
Hey everyone, if i may get a little help, i have recently added a file under controller section of my webapp, and from that time this is causing some issues as such :
Exiting
root@DESKTOP-MI3GRH3:/mnt/c/bckp/Railsapp/scheduled_tweets_flash# C
root@DESKTOP-MI3GRH3:/mnt/c/bckp/Railsapp/scheduled_tweets_flash# rails s
=> Booting Puma
=> Rails 7.0.7 application starting in development
=> Run bin/rails server --help
for more startup options
Exiting
/root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.11/lib/zeitwerk/loader/helpers.rb:171:in `rescue in cname_for': wrong constant name PasswordsController inferred by Module from file (Zeitwerk::NameError)
/mnt/c/bckp/Railsapp/scheduled_tweets_flash/app/controllers/passwords_controller .rb
Possible ways to address this:
- Tell Zeitwerk to ignore this particular file.
- Tell Zeitwerk to ignore one of its parent directories.
- Rename the file to comply with the naming conventions.
Modify the inflector to handle this case.
raise Zeitwerk::NameError.new(<<~MESSAGE, error.name)
^
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.11/lib/zeitwerk/loader/helpers.rb:166:incname_for'
block in set_autoloads_in_dir'
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.11/lib/zeitwerk/loader.rb:414:in
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.11/lib/zeitwerk/loader/helpers.rb:40:inblock in ls'
each'
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.11/lib/zeitwerk/loader/helpers.rb:25:in
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.11/lib/zeitwerk/loader/helpers.rb:25:inls'
set_autoloads_in_dir'
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.11/lib/zeitwerk/loader.rb:411:in
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.11/lib/zeitwerk/loader.rb:124:inblock (2 levels) in setup'
each'
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.11/lib/zeitwerk/loader.rb:123:in
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.11/lib/zeitwerk/loader.rb:123:inblock in setup'
synchronize'
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.11/lib/zeitwerk/loader.rb:120:in
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.11/lib/zeitwerk/loader.rb:120:insetup'
block in module:Finisher'
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.0.7/lib/rails/application/finisher.rb:40:in
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.0.7/lib/rails/initializable.rb:32:ininstance_exec'
run'
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.0.7/lib/rails/initializable.rb:32:in
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.0.7/lib/rails/initializable.rb:61:inblock in run_initializers'
block in tsort_each'
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/tsort.rb:228:in
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/tsort.rb:350:inblock (2 levels) in each_strongly_connected_component'
each_strongly_connected_component_from'
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/tsort.rb:431:in
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/tsort.rb:349:inblock in each_strongly_connected_component'
each'
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/tsort.rb:347:in
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/tsort.rb:347:incall'
each_strongly_connected_component'
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/tsort.rb:347:in
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/tsort.rb:226:intsort_each'
tsort_each'
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/tsort.rb:205:in
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.0.7/lib/rails/initializable.rb:60:inrun_initializers'
initialize!'
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.0.7/lib/rails/application.rb:372:in
from /mnt/c/bckp/Railsapp/scheduled_tweets_flash/config/environment.rb:5:in<main>'
require_relative'
from config.ru:3:in
from config.ru:3:inblock in <main>'
eval'
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/rack-2.2.8/lib/rack/builder.rb:116:in
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/rack-2.2.8/lib/rack/builder.rb:116:innew_from_string'
load_file'
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/rack-2.2.8/lib/rack/builder.rb:105:in
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/rack-2.2.8/lib/rack/builder.rb:66:inparse_file'
build_app_and_options_from_config'
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/rack-2.2.8/lib/rack/server.rb:349:in
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/rack-2.2.8/lib/rack/server.rb:249:inapp'
wrapped_app'
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/rack-2.2.8/lib/rack/server.rb:422:in
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.0.7/lib/rails/commands/server/server_command.rb:76:inlog_to_stdout'
start'
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.0.7/lib/rails/commands/server/server_command.rb:36:in
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.0.7/lib/rails/commands/server/server_command.rb:143:inblock in perform'
tap'
from <internal:kernel>:90:in
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.0.7/lib/rails/commands/server/server_command.rb:134:inperform'
run'
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/thor-1.2.2/lib/thor/command.rb:27:in
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:ininvoke_command'
dispatch'
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/thor-1.2.2/lib/thor.rb:392:in
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.0.7/lib/rails/command/base.rb:87:inperform'
invoke'
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.0.7/lib/rails/command.rb:48:in
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.0.7/lib/rails/commands.rb:18:in<main>'
require'
from <internal:/root/.asdf/installs/ruby/3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in
from internal:/root/.asdf/installs/ruby/3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb:38:inrequire'
require'
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in
from bin/rails:4:in<main>'
const_defined?': wrong constant name PasswordsController (NameError)
/root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.11/lib/zeitwerk/loader/helpers.rb:167:inCNAME_VALIDATOR.const_defined?(cname, false)
Can someone be able to diagnose and help me get through this ?
Recently made some modification and created a new file onto controller, views, but as soon as try to load with rails s or rails c, error message from the (server side, rails :
root@DESKTOP-MI3GRH3:/mnt/c/bckp/Railsapp/scheduled_tweets_flash - Signup# rails s
=> Booting Puma
=> Rails 7.0.7 application starting in development
=> Run bin/rails server --help
for more startup options
Exiting
/root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.0.7/lib/rails/railtie/configuration.rb:96:in method_missing': undefined method
action_controller' for #, @generators=#, @middleware=#, @javascript_path="javascript", @encoding=#Encoding:UTF-8, @allow_concurrency=nil, @consider_all_requests_local=true, @filter_parameters=[], @r_redirect=[], @helpers_paths=[], @hosts=[".localhost", #, #], @ho
As with the Rails Console :
root@DESKTOP-MI3GRH3:/mnt/c/bckp/Railsapp/scheduled_tweets_flash - Signup# rails c
/mnt/c/bckp/Railsapp/scheduled_tweets_flash - Signup/config/application.rb:4:in `module:ScheduledTweets': uninitialized constant Rails::Application (NameError)
class Application < Rails::Application
^
from /mnt/c/bckp/Railsapp/scheduled_tweets_flash - Signup/config/application.rb:3:in <main>'
require'
from <internal:/root/.asdf/installs/ruby/3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in
from internal:/root/.asdf/installs/ruby/3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb:38:in require'
require'
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.0.7/lib/rails/command/actions.rb:22:in require_application!'
require_application_and_environment!'
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.0.7/lib/rails/command/actions.rb:14:in
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.0.7/lib/rails/commands/console/console_command.rb:105:in perform'
run'
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/thor-1.2.2/lib/thor/command.rb:27:in
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in invoke_command'
dispatch'
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/thor-1.2.2/lib/thor.rb:392:in
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.0.7/lib/rails/command/base.rb:87:in perform'
invoke'
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.0.7/lib/rails/command.rb:48:in
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.0.7/lib/rails/commands.rb:18:in <main>'
require'
from <internal:/root/.asdf/installs/ruby/3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in
from internal:/root/.asdf/installs/ruby/3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb:38:in require'
require'
from /root/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in
from bin/rails:4:in `
Can someone help as i may need to access and start work asap , thank you.