I’m trying to deploy an existing Rails app with Docker but I’m getting this error
2023-07-04T20:13:10Z app[148edd31f769d8] bog [info]ERROR No such file or directory (os error 2)
2023-07-04T20:13:10Z proxy[148edd31f769d8] mia [error]could not find a good candidate within 90 attempts at load balancing
2023-07-04T20:13:10Z proxy[148edd31f769d8] bog [error]instance refused connection. is your app listening on 0.0.0.0:3000? make sure it is not only listening on 127.0.0.1 (hint: look at your startup logs, servers often print the address they are listening on)
This is the Fly.toml file
# fly.toml app configuration file generated for billowing-pond-2653 on 2023-07-04T19:51:11Z
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#
app = "billowing-pond-2653"
primary_region = "bog"
console_command = "/rails/bin/rails console"
[http_service]
internal_port = 3000
force_https = true
auto_stop_machines = true
auto_start_machines = true
min_machines_running = 0
processes = ["app"]
[[statics]]
guest_path = "/labor_calculator/public"
url_prefix = "/"
[env]
PORT = "3000"
This is a known problem, and a fix is in the works but has yet to be deployed. For now either ignore it (recommended) or remove the [[statics]] section and ensure that your Dockerfile sets ENV RAILS_LOG_TO_STDOUT="1".
This generally means that either your app didn’t start successfully or isn’t listening on the right port. Rails defaults to 3000, and you set the PORT environment variable, so the port is not likely to be the cause unless you are using something like foreman.
2023-07-04T20:12:50Z app[148edd31f769d8] bog [info] -s, [--skip], [--no-skip] # Skip files that already exist
2023-07-04T20:12:50Z app[148edd31f769d8] bog [info]Rails options:
2023-07-04T20:12:50Z app[148edd31f769d8] bog [info] -h, [--help], [--no-help] # Show this help message and quit
2023-07-04T20:12:50Z app[148edd31f769d8] bog [info] -v, [--version], [--no-version] # Show Rails version number and quit
2023-07-04T20:12:50Z app[148edd31f769d8] bog [info]Description:
2023-07-04T20:12:50Z app[148edd31f769d8] bog [info] The 'rails new' command creates a new Rails application with a default
2023-07-04T20:12:50Z app[148edd31f769d8] bog [info] directory structure and configuration at the path you specify.
2023-07-04T20:12:50Z app[148edd31f769d8] bog [info] You can specify extra command-line arguments to be used every time
2023-07-04T20:12:50Z app[148edd31f769d8] bog [info] 'rails new' runs in the .railsrc configuration file in your home directory,
2023-07-04T20:12:50Z app[148edd31f769d8] bog [info] or in $XDG_CONFIG_HOME/rails/railsrc if XDG_CONFIG_HOME is set.
2023-07-04T20:12:50Z app[148edd31f769d8] bog [info] Note that the arguments specified in the .railsrc file don't affect the
2023-07-04T20:12:50Z app[148edd31f769d8] bog [info] defaults values shown above in this help message.
2023-07-04T20:12:50Z app[148edd31f769d8] bog [info]Example:
2023-07-04T20:12:50Z app[148edd31f769d8] bog [info] rails new ~/Code/Ruby/weblog
2023-07-04T20:12:50Z app[148edd31f769d8] bog [info] This generates a skeletal Rails installation in ~/Code/Ruby/weblog.
2023-07-04T20:12:51Z app[148edd31f769d8] bog [info] INFO Main child exited normally with code: 0
2023-07-04T20:12:51Z app[148edd31f769d8] bog [info] INFO Starting clean up.
2023-07-04T20:12:51Z app[148edd31f769d8] bog [info] WARN hallpass exited, pid: 232, status: signal: 15 (SIGTERM)
2023-07-04T20:12:51Z app[148edd31f769d8] bog [info]2023/07/04 20:12:51 listening on [fdaa:2:73ed:a7b:d0:594a:dc7:2]:22 (DNS: [fdaa::3]:53)
2023-07-04T20:12:52Z app[148edd31f769d8] bog [info][ 2.119411] reboot: Restarting system
2023-07-04T20:12:52Z runner[148edd31f769d8] bog [info]machine exited with exit code 0, not restarting
2023-07-04T20:12:55Z proxy[3d8d9942b60189] bog [info]request.url="http://01H4H8E6Y6QJ46GRS2RBE57KEH:10001/" Starting machine
2023-07-04T20:12:55Z app[3d8d9942b60189] bog [info] INFO Starting init (commit: db101a53)...
2023-07-04T20:12:55Z app[3d8d9942b60189] bog [info] INFO starting statics vsock server
2023-07-04T20:12:55Z app[3d8d9942b60189] bog [info] INFO Preparing to run: `rails server -b 0.0.0.0` as root
2023-07-04T20:12:55Z app[3d8d9942b60189] bog [info] INFO [fly api proxy] listening at /.fly/api
2023-07-04T20:12:55Z proxy[3d8d9942b60189] bog [info]machine started in 217.455141ms
2023-07-04T20:12:55Z app[3d8d9942b60189] bog [info]2023/07/04 20:12:55 listening on [fdaa:2:73ed:a7b:cf:41e1:ecea:2]:22 (DNS: [fdaa::3]:53)
2023-07-04T20:12:55Z proxy[3d8d9942b60189] bog [info]machine became reachable in 6.535076ms
2023-07-04T20:12:55Z app[3d8d9942b60189] bog [info]ERROR No such file or directory (os error 2)
error.message="instance refused connection. is your app listening on 0.0.0.0:3000? make sure it is not only listening on 127.0.0.1 (hint: look at your startup logs, servers often print the address they are listening on)" 2023-07-04T20:12:55Z proxy[3d8d9942b60189] bog [error]request.method="GET" request.id="01H4H8GCNR5XXE20EYHGVBSE6G-mia"
2023-07-04T20:12:56Z app[3d8d9942b60189] bog [info]Usage:
2023-07-04T20:12:56Z app[3d8d9942b60189] bog [info] rails new APP_PATH [options]
2023-07-04T20:12:56Z app[3d8d9942b60189] bog [info]Options:
2023-07-04T20:12:56Z app[3d8d9942b60189] bog [info] [--skip-namespace], [--no-skip-namespace] # Skip namespace (affects only isolated engines)
2023-07-04T20:12:56Z app[3d8d9942b60189] bog [info] [--skip-collision-check], [--no-skip-collision-check] # Skip collision check
2023-07-04T20:12:56Z app[3d8d9942b60189] bog [info] -r, [--ruby=PATH] # Path to the Ruby binary of your choice
2023-07-04T20:12:56Z app[3d8d9942b60189] bog [info] # Default: /usr/local/bin/ruby
2023-07-04T20:12:56Z app[3d8d9942b60189] bog [info] -m, [--template=TEMPLATE] # Path to some application template (can be a filesystem path or URL)
2023-07-04T20:12:56Z app[3d8d9942b60189] bog [info] -d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/postgresql/sqlite3/oracle/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc)
What I don’t see in that Dockerfile is anything resembling COPY . . which is what would add your application to the image. Without an application present, the rails command will simply produce usage information.
If you run the following command, you can get a Dockerfile that will take you considerably further:
thanks! That solved the 504. and im getting this error
root@8a4ddb84456d:/labor_calculator# fly logs -i 32874469f00228
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/activesupport-7.0.5.1/lib/active_support/encrypted_configuration.rb:43:in `read'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/activesupport-7.0.5.1/lib/active_support/encrypted_configuration.rb:64:in `config'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/activesupport-7.0.5.1/lib/active_support/encrypted_configuration.rb:79:in `options'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/activesupport-7.0.5.1/lib/active_support/core_ext/module/delegation.rb:303:in `method_missing'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/activerecord-7.0.5.1/lib/active_record/railtie.rb:332:in `block in <class:Railtie>'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/railties-7.0.5.1/lib/rails/initializable.rb:32:in `instance_exec'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/railties-7.0.5.1/lib/rails/initializable.rb:32:in `run'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/railties-7.0.5.1/lib/rails/initializable.rb:61:in `block in run_initializers'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/lib/ruby/3.2.0/tsort.rb:228:in `block in tsort_each'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/lib/ruby/3.2.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/lib/ruby/3.2.0/tsort.rb:431:in `each_strongly_connected_component_from'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/lib/ruby/3.2.0/tsort.rb:349:in `block in each_strongly_connected_component'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/lib/ruby/3.2.0/tsort.rb:347:in `each'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/lib/ruby/3.2.0/tsort.rb:347:in `call'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/lib/ruby/3.2.0/tsort.rb:347:in `each_strongly_connected_component'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/lib/ruby/3.2.0/tsort.rb:226:in `tsort_each'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/lib/ruby/3.2.0/tsort.rb:205:in `tsort_each'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/railties-7.0.5.1/lib/rails/initializable.rb:60:in `run_initializers'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/railties-7.0.5.1/lib/rails/application.rb:372:in `initialize!'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /labor_calculator/config/environment.rb:5:in `<main>'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from config.ru:3:in `require_relative'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from config.ru:3:in `block in <main>'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/rack-2.2.7/lib/rack/builder.rb:116:in `eval'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/rack-2.2.7/lib/rack/builder.rb:116:in `new_from_string'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/rack-2.2.7/lib/rack/builder.rb:105:in `load_file'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/rack-2.2.7/lib/rack/builder.rb:66:in `parse_file'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/rack-2.2.7/lib/rack/server.rb:349:in `build_app_and_options_from_config'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/rack-2.2.7/lib/rack/server.rb:249:in `app'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/rack-2.2.7/lib/rack/server.rb:422:in `wrapped_app'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/railties-7.0.5.1/lib/rails/commands/server/server_command.rb:76:in `log_to_stdout'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/railties-7.0.5.1/lib/rails/commands/server/server_command.rb:36:in `start'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/railties-7.0.5.1/lib/rails/commands/server/server_command.rb:143:in `block in perform'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from <internal:kernel>:90:in `tap'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/railties-7.0.5.1/lib/rails/commands/server/server_command.rb:134:in `perform'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/thor-1.2.2/lib/thor/command.rb:27:in `run'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/railties-7.0.5.1/lib/rails/command/base.rb:87:in `perform'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/railties-7.0.5.1/lib/rails/command.rb:48:in `invoke'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/railties-7.0.5.1/lib/rails/commands.rb:18:in `<main>'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from bin/rails:4:in `<main>'
2023-07-05T15:31:33Z app[32874469f00228] bog [info]/usr/local/bundle/gems/activesupport-7.0.5.1/lib/active_support/message_encryptor.rb:204:in `final': OpenSSL::Cipher::CipherError
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/activesupport-7.0.5.1/lib/active_support/message_encryptor.rb:204:in `_decrypt'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/activesupport-7.0.5.1/lib/active_support/message_encryptor.rb:160:in `decrypt_and_verify'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/activesupport-7.0.5.1/lib/active_support/messages/rotator.rb:22:in `decrypt_and_verify'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/activesupport-7.0.5.1/lib/active_support/encrypted_file.rb:104:in `decrypt'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/activesupport-7.0.5.1/lib/active_support/encrypted_file.rb:66:in `read'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/activesupport-7.0.5.1/lib/active_support/encrypted_configuration.rb:43:in `read'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/activesupport-7.0.5.1/lib/active_support/encrypted_configuration.rb:64:in `config'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/activesupport-7.0.5.1/lib/active_support/encrypted_configuration.rb:79:in `options'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/activesupport-7.0.5.1/lib/active_support/core_ext/module/delegation.rb:303:in `method_missing'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/activerecord-7.0.5.1/lib/active_record/railtie.rb:332:in `block in <class:Railtie>'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/railties-7.0.5.1/lib/rails/initializable.rb:32:in `instance_exec'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/railties-7.0.5.1/lib/rails/initializable.rb:32:in `run'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/railties-7.0.5.1/lib/rails/initializable.rb:61:in `block in run_initializers'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/lib/ruby/3.2.0/tsort.rb:228:in `block in tsort_each'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/lib/ruby/3.2.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/lib/ruby/3.2.0/tsort.rb:431:in `each_strongly_connected_component_from'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/lib/ruby/3.2.0/tsort.rb:349:in `block in each_strongly_connected_component'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/lib/ruby/3.2.0/tsort.rb:347:in `each'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/lib/ruby/3.2.0/tsort.rb:347:in `call'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/lib/ruby/3.2.0/tsort.rb:347:in `each_strongly_connected_component'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/lib/ruby/3.2.0/tsort.rb:226:in `tsort_each'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/lib/ruby/3.2.0/tsort.rb:205:in `tsort_each'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/railties-7.0.5.1/lib/rails/initializable.rb:60:in `run_initializers'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/railties-7.0.5.1/lib/rails/application.rb:372:in `initialize!'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /labor_calculator/config/environment.rb:5:in `<main>'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from config.ru:3:in `require_relative'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from config.ru:3:in `block in <main>'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/rack-2.2.7/lib/rack/builder.rb:116:in `eval'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/rack-2.2.7/lib/rack/builder.rb:116:in `new_from_string'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/rack-2.2.7/lib/rack/builder.rb:105:in `load_file'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/rack-2.2.7/lib/rack/builder.rb:66:in `parse_file'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/rack-2.2.7/lib/rack/server.rb:349:in `build_app_and_options_from_config'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/rack-2.2.7/lib/rack/server.rb:249:in `app'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/rack-2.2.7/lib/rack/server.rb:422:in `wrapped_app'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/railties-7.0.5.1/lib/rails/commands/server/server_command.rb:76:in `log_to_stdout'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/railties-7.0.5.1/lib/rails/commands/server/server_command.rb:36:in `start'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/railties-7.0.5.1/lib/rails/commands/server/server_command.rb:143:in `block in perform'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from <internal:kernel>:90:in `tap'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/railties-7.0.5.1/lib/rails/commands/server/server_command.rb:134:in `perform'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/thor-1.2.2/lib/thor/command.rb:27:in `run'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/railties-7.0.5.1/lib/rails/command/base.rb:87:in `perform'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/railties-7.0.5.1/lib/rails/command.rb:48:in `invoke'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/railties-7.0.5.1/lib/rails/commands.rb:18:in `<main>'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from /usr/local/bundle/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
2023-07-05T15:31:33Z app[32874469f00228] bog [info] from bin/rails:4:in `<main>'
2023-07-05T15:31:34Z app[32874469f00228] bog [info] INFO Main child exited normally with code: 1
2023-07-05T15:31:34Z app[32874469f00228] bog [info] INFO Starting clean up.
2023-07-05T15:31:34Z app[32874469f00228] bog [info] WARN hallpass exited, pid: 232, status: signal: 15 (SIGTERM)
2023-07-05T15:31:34Z app[32874469f00228] bog [info]2023/07/05 15:31:34 listening on [fdaa:2:73ed:a7b:d0:9541:2824:2]:22 (DNS: [fdaa::3]:53)
2023-07-05T15:31:35Z app[32874469f00228] bog [info][ 5.130082] reboot: Restarting system
2023-07-05T15:31:35Z runner[32874469f00228] bog [info]machine has reached its max restart count (10)
before that a had another error with the credendials and apparently that is solved but i dont know how to solve this last one. im also trying to connect in to the console but im cant do that
You still have a credentials problem. In particular, your master.key doesn’t match your credentials.yml.enc. (or, if you have configured separate credentials config/credentials/production.yml.enc).
Assuming the normal case, and that you haven’t created any custom credentials, the easiest way to get started is to remove both of these files, run bin/rails credentials:edit to create new credentials, and then run:
fly secrets set RAILS_MASTER_KEY=$(cat config/master.key)