Rails app can't be reached

Hi need help with my rails API with the sidekiq process successfully deploys but I can’t reach any endpoint on it

this is my fly.toml file

type or paste code here
```# fly.toml file generated for carviva on 2022-09-02T21:54:22+01:00

app = "carviva"
kill_signal = "SIGINT"
kill_timeout = 5

    BUNDLER_VERSION = "2.2.3"
    NODE_VERSION = "14.18.0"
    RUBY_VERSION = "3.0.0"


  PORT = "3000"
  SERVER_COMMAND = "bin/rails fly:server"

  allowed_public_ports = []
  auto_rollback = true

  web = "bundle exec puma -C config/puma.rb"
  worker = "bundle exec sidekiq"

  http_checks = []
  internal_port = 3000
  processes = ["web"]
  protocol = "tcp"
  script_checks = []
    hard_limit = 25
    soft_limit = 20
    type = "connections"

    force_https = true
    handlers = ["http"]
    port = 80

    handlers = ["tls", "http"]
    port = 443

    grace_period = "1s"
    interval = "15s"
    restart_limit = 0
    timeout = "2s"

  guest_path = "/app/public"
  url_prefix = "/"

![Screenshot 2022-09-03 at 11.46.33|690x223](upload://ksXxcVhq7fpFPT5RHQ7L2kfw4EY.png)
![Screenshot 2022-09-03 at 11.47.29|690x431](upload://1k80LKLcZlzPKxMdvtPokVnfc5z.jpeg)

Unfortunately, your screenshots didn’t upload.

Hi these are the screenshots

It looks like you point the root path to the public directory, try this:

  guest_path = "/app/public"
  url_prefix = "/public"

still unable to reach the application

I’m not sure what is going on. It doesn’t look like your problem has anything to do with sidekiq, you can’t get to your web server. And your logs don’t show your web server crashing. I’ve tried replicating what you have done, but unfortunately it works here.

The one thing I see unusual in your logs is the warnings that environment variables are already set. I don’t see that on my app. But despite these warnings, your web server starts up.

My recommendation is that you run through the exercise defined at https://fly.io/docs/rails/getting-started/`

If that fails for you, that will tell us a lot. If it doesn’t, using the same application, bundle add sidekiq, then make the same changes you did to the toml file, namely to add the [processes] section, change 8080 to 3000 in both places, and change app to web in the [[services]]. If you made any other changes, let me know as I missed it, and I will try to replicate what you have done here.

Other notes that shouldn’t matter:

When you define [processes], it overrides SERVER_COMMAND, so that line can be deleted. You can also make the web process run bin/rails fly:server, but unless you replaced puma with another web server in your Gemfile, this will do the same thing. And, yes, I need to update the docs page on the fly.io site, that’s still on my todo list.

There is no need to change 8080 to 3000, but there is no harm in doing so as long as you change this in both places in the toml file, as you have done.

for some reason
I had this in my robots.txt file in the public folder

User-agent: *
Disallow: /

the deployment works now :smile: :smile: