Missing documentation for going into production


I’m missing a documentation, when i want to go into production. The documentation for the normal developing of an app is good, but when I want to go into production, I feel totally lost.

First thing, I didn’t know, what is the best way, to publish an app online, which provider I should use and how to setup the server.

The next thing was, that the configuration for the production environment is forcing SSL and I didn’t know anything about SSL. So I was getting a self-hosted server, was creating a ssl certificate but didn’t know, how to give it to Puma. When I was searching in the internet, how I can do it, somebody told on StackOverflow, that puma is not concepted for public use and instead you should use a reverse proxy like Nginx, which communicates with puma and do the ssl thing. So I had to learn what Nginx is, how the setup and to use it.

When I finally had everything setup, i wanted to start my server in production, but got errors. I didn’t know, that I have to create the production database extra and that the normal db:create is only creating the databases for the test and development environment. After that, I had the next error, that the application.css file is missing and I didn’t understand what was happening, because i tested the production environment first, with a fresh ruby on rails app. I found something in StackOverflow, that you have to start manually the compiling of the assets files, so that the assets files are compiled to the public-folder with the command: RAILS_ENV=production rails assets:precompile

So it would be very cool, if you would have a little help from the documentation, how to go into production.

1 Like

have you checked out https://kamal-deploy.org from ddh folks

I agree it would be nicer if there was at least a bit of introduction to that on rails guides or documentation itself. In case you need any extra advice on that matter though, on one of the topics I posted I got a nice answer about how to approach preparing rails project for a production environment. You might find it helpful.

@oystersauce8 Thanks for the link, I saw some weeks before this video, when I was starting developing in Ruby on Rails, but it was overwhelming me. There is a lot of knowledge in some minutes and the video is really fast and you have to use Kamal (and Docker). I just wanted to have a documentation in the Ruby on Rails guides to go into production.

@CurioShade Thank you for your reply. So you had the exact same question as me :slight_smile: The steps described in the reply of your question are good too. I’m already near to the end, to have my app running as a production app. But you are a another example, that you would like to have more information for this.

I was just making this question here, so that maybe in the future a guide could be created for this.

1 Like