Ruby on rails application in Windows Azure Virtual Machine - ruby-on-rails

Hi i have created a ubuntu virtual machine in windows azure for deploying my rails application..
I have connected to my virtual machine through ssh and followed this procedure for deployment
<http://www.andrehonsberg.com/article/install-rvm-ubuntu-1204-linux-for-ruby-193>
<http://www.windowsazure.com/en-us/develop/ruby/tutorials/web-app-with-linux-vm/>
My deployment was completed successfully.
While starting my server by running rails s in my application i am able to see my application up and running in browser.
My issue is the server is stopped for every 10 minutes and again i have to connect to my server through ssh and need to give rails s..
i want a solution to run my application continously..

The problem is you haven't actually "deployed" anything. You just copied your rails app to a VM and ran rails s.
A production rails applications is not deployed in this fashion.
Consider using either nginx with unicorn or apache/nginx with passenger.

Related

Deploying Ruby On Rails app on macOS Server

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.
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.

run rails app with an ubuntu server with global ip

Currently, we are running our rails app, on AWS but we tried to move it to Heroku, which didn't work at all, now We are trying to run the app on Virtual Machine on hetzner. I can run the app on local server easily, my question is that, How can we run our rails app with a specific IP and then we can access that app anywhere in the world from that ip? is that possible to do so? We are using PUMA for server.
Yes, you can access to to your site with specific IP.
In description of hetzner Virtual Server says that server have 1 specific IP. So than you deployed and run you application y can access to app with 1.1.1.1:80 or another port.
If i understand you. Also what happened with heroku?

Hosting Rails on local network

I have been deploying my rails app to digitalocean on ubuntu OS and it's working fine. However, I would like to deploy my rails app on a local ubuntu network.
I have tried to setup rails on ubuntu and it's working fine and I am able to open network access with port 3000 by the same network to access via
$ rails server -b 0.0.0.0
This a bit slow from another local network computer to access. What is the better way where I can deploy rails app to my local server and only for same local network usage.
I have been doing the same thing on a Raspberry pi with several projects.
You can actually treat your local server like an external one. You can deploy on the local server using capistrano.
Just make sure that your app on your local server will be deployed as production, not development. I would also recommend NGINX and unicorn for performance and zero downtime deployment.

Setting up Rails on Hostmonster

I'm able to run rails s through ssh successfully and see the app start up just as it does on my own machine but I'm unable to access the app from the web. The app is directly under the home folder and I have a symbolic link pointing from public_html to the public folder of my rails app, just as this tutorial explains. I even tried setting up a subdomain and every other step in the tutorial to no avail. Any help would be highly appreciated.
You need an application server like Phusion Passenger, Unicorn or puma to run a Ruby app in a production environment. Typically, you'll integrate the application server into a web server's (Apache, nginx) environment.
I don't know about your hoster, but if you have root access, then you can probably use any of these application servers.
The built-in server you start by running rails server is only meant for testing purposes on your local machine. It has not been made with security, performance, stability or any other production-environment criteria in mind.

Rails application on Cent OS azure virtual machine not working

I have created one Cent Os Virtual Machine on windows Azure for deploying my rails application. I am using the following steps for accessing my app..
1.Doing SSH to my app xxx.cloudapp.net
2.Giving rails s command in my app directory.
I am able to view my app running on azure cloud. But the problem is server gets stopped for every 10-15 minutes and again I need to restart my server with rails s
Am I following the correct procedure or is there any other method to keep the server continuously running?

Resources