# Ocra: can't execute the executable

**URL:** <https://www.ruby-forum.com/t/ocra-cant-execute-the-executable/186594>\
**Category:** Rails\
**Created:** [April 9, 2010, 11:20am UTC](https://www.ruby-forum.com/t/ocra-cant-execute-the-executable/186594 "2010-04-09T11:20:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vecchiaspugna](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/67e7ee/32.png) [@vecchiaspugna](https://www.ruby-forum.com/u/vecchiaspugna)\
**Post date:** [April 9, 2010, 11:20am UTC](https://www.ruby-forum.com/t/ocra-cant-execute-the-executable/186594/1 "2010-04-09T11:20:45Z")

</div>

Hi all!

I was very excited when i find out Ocra, that was exactly what i needed!  
but… unfortunately i can’t make my executable work.

I create everything without any errors

- i make my rails app

- i create a file init.rb that makes “load script/server”

- i create a single rb file with tar2rubyscript foldername

- i run ocra --console filename.rb

- i add this line at the top of filaname.rb: “exit if  
Object.const\_defined?(:Ocra)”. (without this, after he launchs the  
server, how can i make create the executable? if i stop the server it  
does not create it!)

- filename-exe -\> “missing the rails 2.3.5 gem…”

obviously i have this version of rails!

(but shouldn’t it be a standalone executable? he should have all the  
gems inside!)

thank you for your attention  
Marco
