Networked Ruby on Rails URL/Address? - ruby-on-rails

I have created an app with a Ruby on Rails backend and a VueJS frontend. I have successfully created the desktop version of the app, but I am now testing and tweaking the mobile version to verify cross compatibility.
The challenge that I am confronted with is that I can access the VueJS portion of my app via the local IP address that the VueJS server provides (http://10.0.0.163:8080), but I have no such networked IP address for the Ruby on Rails server.
As such, my app will appear, but it does not function 100%, as the VueJS app cannot reference the Ruby on Rails address (http://localhost:3000) while being viewed on another networked device.
Does anyone know of a way to change the settings so that I can remotely access the Ruby on Rails server from a networked VueJS address?
If anyone has any resources, it would be of great assistance.
Thank you,
DD

Related

Connect Rails with React Native

For a university project I had to build a website in Ruby on Rails and deployed it via Azure. The website is live and running smoothly.
After two weeks the website has been deployed, my professor asked me to create a React Native app using the Rails Backed.
So far, I have created the front-end using React Native BUT I have no clue how to connect it to the Rails backend (I guess I need an API but not sure how to do it).
I googled it around, but there is not a specific tutorial that helps me in connecting a Rails live website with React Native.
I am new to this world and need some guidance in the right direction.
Create a new rails application that functions as the api. You'll have to run the rails new command with an additional --api flag.
rails new rails-api-with-react --api
Move into the directory
rails-api-with-react
Start your server
rails server
Use a tool like [Postman][1] to check that the server is running.
After you confirm that the server is up and running, make a get request in your React application to the Rails server

Building a server to host rails app locally

I want to know how to build a rails server and host an app on it locally. I know I can use heroku or aws but in the case of this app I can’t, the database should be hosted locally in the company for security reasons; they do not want to store their data on servers that are not theirs.
How do I start?
What are the main things to consider?
Do I host on heroku and link the local database to the site or do I host them all in the same place?
How much power does the machine need for around 10-20k users?
What OS should I use Ubuntu or what?
Would really appreciate if you have any tutorials or article links.
You can just use ngrok. It doesn't require any side server deployments.

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?

Using a Rails JSON API as a backend for desktop app

My company is wanting to use a Rails JSON API app as a backend for a desktop app. The Rails JSON API would use a Postgresql database.
However, some customers self host their data, meaning they have a postgresql server installed on a computer the desktop app uses. Because of these users, we would have to deploy this Rails app and customers would have to run the Rails API server on their machines, including Windows machines. Is this a good idea or even possible?
If your customers are running the db themselves, you probably don't need an api, right?
Otoh, there are tools like portable ruby by the phusion team that let you pacakge up a Ruby app. You can also build the app via JRuby as a jar or war and deploy that in any env with Java

Resources