Search code examples
ruby-on-railsrubylibgosu

rendering ruby application file (game) with rails


I have a ruby file that creates a game window for me (using the gosu gem).

I am trying to render this file to a webpage.

I understand that javascript is best for doing this sort of thing but as I do not know it and am not allowed to use it for this project I'm wondering if there is any way of rendering that file directly to the webpage?

I have tried

    <%= render :file => '/games/game_window.rb' %>

but that simply renders the file as text.

Even if the method of doing this might be somewhat difficult to understand I am still interested in knowing how to do it, thank you!


Solution

  • The gosu gem does not create a web application, but a desktop application. You cannot simply throw the code on a browser and hope that it runs...

    Currently there is no way to run it on a web, so, no, it is not possible.