I created an app using ruby on rails and would like to share it with someone. How can I create an executable so they can simply download and run the app?
I searched many answers online but they seem to be outdated and dont work for the current ruby version.
I have am using ruby 3.2.3 and rails 7.1.3
Ruby on Rails is a web development framework, so it is not intended to be compiled into executable files that can be sent via an archive. If you intend to show how an application created in Ruby on Rails works to someone else, you should consider mounting it on a web server with tools like Kamal to simplify the process.
You can mount the application in a Docker container that installs all the necessary dependencies and a script that simply builds the container and runs it.
On the other hand, you can use Nginx to mount your application locally and set up a network environment that will allow others to access it via a link. However, remember that the application will be running on your computer. The other person accesses it in the same way they access a social network (through a request to a server).
As for the Ruby language, it is not compiled either but is interpreted at runtime, translating it into bytecodes that are executed by the hardware. There are ways to compile Ruby like OCRA and Ruby Packer. Rails has nothing to do with it here, this is just for Ruby. These libraries are not prepared for serious projects, anyway.
Instead, languages like Rust and C compile and generate an executable file that has no dependencies. That is, the hardware can read directly.