# Rails code is not auto reloading inside dev containers

**URL:** https://meta.discourse.org/t/rails-code-is-not-auto-reloading-inside-dev-containers/383327
**Category:** Development
**Created:** [September 19, 2025, 5:48pm UTC](https://meta.discourse.org/t/rails-code-is-not-auto-reloading-inside-dev-containers/383327 "2025-09-19T17:48:51Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![alisson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alisson/32/491839_2.png) [@alisson](https://meta.discourse.org/u/alisson)
#### Post date: [September 19, 2025, 5:48pm UTC](https://meta.discourse.org/t/rails-code-is-not-auto-reloading-inside-dev-containers/383327/1 "2025-09-19T17:48:51Z")

</div>

Rails logs after make some change:

```sh
[DEV]: Edited files which are not autoloaded. Restarting server...
       - app/controllers/admin/admin_controller.rb
RESTARTING UNICORN
I, [2025-09-19T16:35:33.289558 #1735] INFO -- : reaped #<Process::Status: pid 2207 exit 0> worker=0
I, [2025-09-19T16:35:33.289638 #1735] INFO -- : reaped #<Process::Status: pid 2214 exit 0> worker=1
I, [2025-09-19T16:35:33.289701 #1735] INFO -- : reaped #<Process::Status: pid 2226 exit 0> worker=2
I, [2025-09-19T16:35:33.289718 #1735] INFO -- : master complete
  TRANSACTION (0.1ms) BEGIN

```

In another terminal, if I send a request, `curl` just hangs:

```sh
$ curl 127.0.0.1:3000
# nothing happens

```

In terminal where I ran `bin/rails s`, I need to type `ctrl + c`:

```sh
Flushed 2 metrics
^CGot INT signal
Shutting down
Terminating quiet threads for default capsule
Scheduler exiting...
Firing quiet event
Firing shutdown event
Pausing to allow jobs to finish...
Bye!
I, [2025-09-19T16:39:36.317846 #4843] INFO -- : Refreshing Gem list
Starting CSS change watcher
  TranslationOverride Pluck (0.4ms) SELECT "translation_overrides"."translation_key", "translation_overrides"."value" FROM "translation_overrides" WHERE "translation_overrides"."locale" = 'en'

```

Now, in the second terminal `curl` works as expected:

```sh
$ curl 127.0.0.1:3000
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Discourse</title>
    <meta name="description" content="">

```

## Things i tried

The [devcontainer.json](https://github.com/discourse/discourse/blob/main/.devcontainer/devcontainer.json) has:

```json
"image": "docker.io/discourse/discourse_dev:20250307-0016",

```

I changed my `devcontainer.json` local to:

```json
"image": "docker.io/discourse/discourse_dev:release",

```

That did not solve the problem.

In `config/environments/development.rb`

```rb
config.file_watcher = ActiveSupport::FileUpdateChecker

```

That also did not solve the problem.

## Steps I use to start rails server:

```sh
cd discourse
code . # select "open folder in container"

```

I do not use vscode tasks, so in another terminal i run:

```sh
docker exec -ti -u discourse $ID bash
cd workspace/discourse/
bin/rail s

```

Also, I was expecting the `app` folder to be inside `config.autoload_paths`, but it is not:

```sh
bin/rails console
Loading development environment (Rails 8.0.2.1)
[1] pry(main)> Rails.application.config.autoload_paths
=> ["/workspace/discourse/lib", "/workspace/discourse/lib/guardian", "/workspace/discourse/lib/i18n", "/workspace/discourse/lib/validators"]

```

---

_[View the full topic](https://meta.discourse.org/t/rails-code-is-not-auto-reloading-inside-dev-containers/383327)._
