# \[solved\] init.rb file not working on Windows or Raspberry Pi (Sonic Pi 4.4.0)

**URL:** <https://in-thread.sonic-pi.net/t/solved-init-rb-file-not-working-on-windows-or-raspberry-pi-sonic-pi-4-4-0/8229>\
**Category:** Support, Help & Resources\
**Created:** [October 8, 2023, 3:19pm UTC](https://in-thread.sonic-pi.net/t/solved-init-rb-file-not-working-on-windows-or-raspberry-pi-sonic-pi-4-4-0/8229 "2023-10-08T15:19:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![drmindflip](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/drmindflip/32/2627_2.png) [@drmindflip](https://in-thread.sonic-pi.net/u/drmindflip)\
**Post date:** [October 8, 2023, 3:19pm UTC](https://in-thread.sonic-pi.net/t/solved-init-rb-file-not-working-on-windows-or-raspberry-pi-sonic-pi-4-4-0/8229/1 "2023-10-08T15:19:25Z")

</div>

I’ve been trying to get Sonic Pi to play a simple `sample :loop_amen_full` or `play 60` upon opening. I’ve tried putting the code in the init.rb file on both Windows and Raspberry Pi and neither seems to work at all.

On Windows, the location is:

```ruby
C:/Program Files/Sonic P/iapp/config/user-examples/init.rb

```

On Raspberry Pi:

```ruby
/opt/sonic-pi/app/config/user-examples/init.rb

```

Any idea what might be wrong?

…

Answer: I was editing the wrong file! The real locations are:

**Windows:**

```ruby
C:/Users/<username>/.sonic-pi/config/init.rb

```

**Raspberry Pi:**

```ruby
/home/<username>/.sonic-pi/config/init.rb

```
