Reputation: 355
So I have created a ruby on rails application that functions as a basic calculator. Now I want to package this application up, upload to github, download onto Jenkins, and create a Jenkins job that will run this ruby application.
Normally if this was a Java Application, you would package it as a jar file and then run the jar file. What would I package this Ruby application as?
I thought about packaging this application as a Ruby Gem, but aren't Ruby Gems mainly for when you want to use your ruby app inside of another ruby application? I want to run this app as a stand alone application.
Even if I were to package the Ruby on Rails app as a Ruby Gem, how would I run the gem as a stand alone gem? What would be the command to run it as such from the command line?
Upvotes: 5
Views: 3637
Reputation: 1800
Unlike Java applications that have packaging as a first class citizen(be it a jar or a war) this concept isn't baked in most development environments.
That's why there a big push towards docker, it allows you to insulate your app(and gem dependencies) and plug it into the production environment much like dropping a war into a container.
Here's an article about dockerizing a Rails app: https://semaphoreci.com/community/tutorials/dockerizing-a-ruby-on-rails-application
Upvotes: 5