Connect to Rails server with iPhone


I wanted to access the local Rails app on my Mac on my iPhone. I was able to connect more easily than I imagined.


Mac and iPhone must be connected to the same Wi-Fi


1. Check the IP address of your Mac

Check the IP address with the apple mark → System Preferences → Network → Details → TCP / IP.

2. Start the Rails server by specifying the IP address.

Start the Rails server by specifying the IP address confirmed in step 1.

$ rails s -b <IP address>

Specify the IP address by using the -b option

3. Access the Rails server from your iPhone.

Enter the following in the iPhone browser.

Access port 3000 with: 3000. Rails defaults to 3000.


If you make a mistake or make a strange statement, please feel free to comment!

Recommended Posts

Connect to Rails server with iPhone
Connect to DB with Java
Connect to MySQL 8 with Java
Connect to oracle with eclipse!
[Docker + Rails] How to deal with Rails server startup failure
How to get along with Rails
Introducing React to Rails with react-rails
Connect to Amazon EC2 with SSH (Ubuntu)
[Rails] How to use rails console with docker
Deploy to heroku with Docker (Rails 6, MySQL)
How to build Rails 6 environment with Docker
Downgrade an existing app created with rails 5.2.4 to 5.1.6
The code I used to connect Rails 3 to PostgreSQL 10
Try deploying Rails application to EC2-Part 2 (Server construction)-
Deploy Rails to ECS Fargate with AWS Copilot
One way to redirect_to with parameters in rails
I want to play with Firestore from Rails
[Rails] How to easily implement numbers with pull-down
How to build API with GraphQL and Rails
Rails beginners tried to get started with RSpec
Error deploying rails5 + Mysql to heroku with Docker-compose
[Rails] How to build an environment with Docker
Try to summarize the common layout with rails
[Rails] I want to load CSS with webpacker
Easy to display hello world with Rails + Docker
Connect with VS Code from a Windows client to Docker on another server
[Java] [SQL Server] Connect to local SQL Server 2017 using JDBC for SQL Server
How to make batch processing with Rails + Heroku configuration
[Rails] How to search by multiple values ​​with LIKE
How to connect MySQL / MariaDB + HikariCP with Liferay 7 / DXP
What to do if the Rails server can't start
How to write Rails
How to push an app developed with Rails to Github
Introducing CircleCI to Rails
What to do if rails server can't be stopped
Introducing Bootstrap to Rails 5
How to delete a new_record object built with Rails
Rails deploy with Docker
How to make an almost static page with rails
[Java] Connect to MySQL
To connect from Spring to MySQL on virtual server (unsolved)
[Rails 6] RuntimeError with $ rails s
I started MySQL 5.7 with docker-compose and tried to connect
How to manually generate a JWT with Rails Knock
Introduce Vue.js to Rails
Handle devise with Rails
[Rails] Learning with Rails tutorial
I want to authenticate users to Rails with Devise + OmniAuth
[How to insert a video in haml with Rails]
How to uninstall Rails
[Rails] How to deal with URL changes after render
[Rails] Test with RSpec
HTTPS connection with Java to the self-signed certificate server
How to query Array in jsonb with Rails + postgres
Addicted to the webpacker that comes standard with Rails 6
Supports multilingualization with Rails!
How to get started with creating a Rails app
Double polymorphic with Rails
Ssh connect from container to git with VSCode Remote Container
When the server does not start with rails s
Rails server doesn't start.