-1

So lately, I offer myself a Mac Mini which I want to use as a server (Websites, caching, Xcode Server (which is not working), VPN (which is not working), and stuff). Currently it is running macOS Sierra (10.12.4) with Server.app (5.3) installed. I've successfully enabled Websites & DNS service so my server is accessible from the outside. I have a trusted and valid SSL certificate.

The problem is...

...I don't know how to setup the server to be a production server for Ruby On Rails.

Want I want

  • To host a web app using Ruby On Rails on macOS server (www.example.com)
  • To know how to setup the server app to serve a web app
  • To host a Git repository for the web app code

I looked at the settings for Websites service in the Server app but I didn't find any options for other than PHP and Python.

What I know

  • My MacBook is already setup with Ruby 2.4 and Rails 5.0. I know how to install Rails for development purpose

Even if it's not straight-forward, post any help you have.

One of my guesses is that I could forward the port opened for the website without specifying a folder where the files are in the Server app.

I'd be pleased of you inlight in some way to achieve my goal.

  • 1
    This is not what this site is for. Stackoverflow is for specific code questions. What you're looking for is a guide to put together a rails application, then deploy it, both can easily be found with a google search. In terms of deploying you want to look at Heroku for your early projects since they do free website hosting. – SomeSchmo May 12 '17 at 18:08
  • Yes, this is what I'm looking for, but since I didn't find any help by googling it I ask a great community of developers if they have already done it. I don't want to deploy on Heroku, I want to host my website on my server (it is just for myself) – MacTHEgenius May 13 '17 at 01:30

1 Answers1

0

I am pretty sure that you don't want to actually run production off of your mac mini. That said once you have your rails app running you can run rails s to run your server locally. If you want a production site you should look into either heroku or AWS elastic beanstalk for deployment.

ruby_newbie
  • 3,190
  • 3
  • 18
  • 29
  • Heroku is a good choice, but it is a private website for my own usage. If I may ask, why do you think I should not actually run production off of my Mac mini ? – MacTHEgenius May 13 '17 at 01:33
  • Long story short there will be a lot of differences between your local environment and a deployed application so it is good to test in an environment that closely matches your production env. That said if you want to run locally in production mode you can follow this thread: http://stackoverflow.com/questions/1949229/change-a-rails-application-to-production – ruby_newbie May 16 '17 at 21:12
  • Thank you, I'll take a look ! – MacTHEgenius May 18 '17 at 01:44