# Enabling YJIT via Template Doesn't Work

**URL:** https://meta.discourse.org/t/enabling-yjit-via-template-doesnt-work/401815
**Category:** Support
**Created:** [April 29, 2026, 2:26pm UTC](https://meta.discourse.org/t/enabling-yjit-via-template-doesnt-work/401815 "2026-04-29T14:26:31Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [April 29, 2026, 6:36pm UTC](https://meta.discourse.org/t/enabling-yjit-via-template-doesnt-work/401815/2 "2026-04-29T18:36:16Z")

</div>

> [@cedric\_chin](#):
>
> `sudo -u discourse RAILS_ENV=production bundle exec rails runner 'puts "YJIT enabled: #{RubyVM::YJIT.enabled?}"; puts RUBY_DESCRIPTION'`

Isn’t that a misdiagnose? You are checking the ENV of a brand new spawned ruby proccess instead of the one running the actual web server.

If you inspect the `/proc/<pid>/environ` of the Pitchfork mold process you will see the YJIT env var there.

```plaintext
root@raspberrypi5:/var/discourse# cat /proc/3331660/environ | tr '\0' '\n' | grep -i yjit
RUBY_YJIT_ENABLE=1

```

---

_[View the full topic](https://meta.discourse.org/t/enabling-yjit-via-template-doesnt-work/401815)._
