# Error trying to directly run server

**URL:** <https://in-thread.sonic-pi.net/t/error-trying-to-directly-run-server/2528>\
**Category:** Support, Help & Resources\
**Created:** [June 29, 2019, 9:03am UTC](https://in-thread.sonic-pi.net/t/error-trying-to-directly-run-server/2528 "2019-06-29T09:03:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tobyhede](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/tobyhede/32/1006_2.png) [@tobyhede](https://in-thread.sonic-pi.net/u/tobyhede)\
**Post date:** [June 29, 2019, 9:03am UTC](https://in-thread.sonic-pi.net/t/error-trying-to-directly-run-server/2528/1 "2019-06-29T09:03:08Z")

</div>

I am trying to run Sonic Pi without the GUI and receiving an error.

`> /Applications/Sonic\ Pi.app/server/ruby/bin/sonic-pi-server.rb`

`uninitialized constant FFI::Platform::CPU (NameError)`

I’ve tried a couple of different versions of Ruby.

Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![robin.newman](https://avatars.discourse-cdn.com/v4/letter/r/76d3ee/32.png) [@robin.newman](https://in-thread.sonic-pi.net/u/robin.newman)\
**Post date:** [June 29, 2019, 9:08am UTC](https://in-thread.sonic-pi.net/t/error-trying-to-directly-run-server/2528/2 "2019-06-29T09:08:55Z")

</div>

Sonic Pi is not supported running without the gui, but it is possible to use a “virtual” gui which does let it run. See this article [here](http://in-thread.sonic-pi.net/t/sonic-pi-for-standalone-installations/225/4)

---

<div class="post-metadata">

**Author:** ![tobyhede](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/tobyhede/32/1006_2.png) [@tobyhede](https://in-thread.sonic-pi.net/u/tobyhede)\
**Post date:** [June 29, 2019, 9:16am UTC](https://in-thread.sonic-pi.net/t/error-trying-to-directly-run-server/2528/3 "2019-06-29T09:16:38Z")

</div>

Thanks.

I 've seen stuff like `sonic-pi-tool` and the emacs plugin that just seem to call server directly and thought I could do the same.

---

<div class="post-metadata">

**Author:** ![tobyhede](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/tobyhede/32/1006_2.png) [@tobyhede](https://in-thread.sonic-pi.net/u/tobyhede)\
**Post date:** [June 29, 2019, 12:03pm UTC](https://in-thread.sonic-pi.net/t/error-trying-to-directly-run-server/2528/4 "2019-06-29T12:03:23Z")

</div>

Pretty sure something in my environment causing the problem.

Digging through `mainwindow.cpp` I discovered that SonicPi bundles its own Ruby.

If I execute the server using the bundled Ruby, problem disappears:  
`/Applications/Sonic Pi.app/app/server/native/ruby/bin/ruby /Applications/Sonic Pi.app/app/server/ruby/bin/sonic-pi-server.rb`
