Rails api on flutter

329 views
Skip to first unread message

Devashi Jain

unread,
Oct 21, 2020, 5:08:22 AM10/21/20
to Flutter Development (flutter-dev)
Hi,
I am new to flutter development.
I have created APIs using Ruby on rails using MS SQL Server as the database. My API work fine on the emulator but I am unable to run my APIs on a physical device (connected via usb).
I have tried using ipv4 address with the ruby port number 3000  but nothing works. Can someone please suggest something.
Also can someone guide as to how I host my rails API and deploy it to me MS SQL Server.

for emulator, I am using -10.0.2.2:3000 

Thank you for the help.

Matthias Sweertvaegher

unread,
Oct 22, 2020, 6:16:53 AM10/22/20
to Flutter Development (flutter-dev)
are you using release build on device? maybe you need to add network permission?
check adb logcat

Devashi Jain

unread,
Oct 23, 2020, 2:37:44 AM10/23/20
to Matthias Sweertvaegher, Flutter Development (flutter-dev)
Hi,
I was able to run my app on device. How do I host my flutter app on rails server?? 
Flutter is my front end, used with rails api or backend to interact with MS SQL Server.  Can someone please help on this. This is my first project. Do I need to host my rails api first and or do i deploy my flutter app to rails server. How to go about this?

--
You received this message because you are subscribed to a topic in the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/flutter-dev/jANC5OZJSZM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/d7cd3725-8410-4f8f-9e87-f692a74d2e0bn%40googlegroups.com.

ABADA SAMUEL

unread,
Oct 23, 2020, 4:08:28 AM10/23/20
to Devashi Jain, Matthias Sweertvaegher, Flutter Development (flutter-dev)
You need to host your API on a server and use that server URL or IP(as tge case may be) as your API base URL in your flutter app.

You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/CADSXRNOz587NT%2BdT5fxkNeYG2O3_1PY_zCn%3DjB79x3%2BRpFOOmw%40mail.gmail.com.

Devashi Jain

unread,
Oct 23, 2020, 4:50:57 AM10/23/20
to ABADA SAMUEL, Matthias Sweertvaegher, Flutter Development (flutter-dev)
How do you recommend I host my apis? It’s my first time creating and hosting. Can you please suggest how to go about this? Thanks 

Thanks & Regards,
Devashi Jain

Sent from my iPhone

On 23-Oct-2020, at 1:38 PM, ABADA SAMUEL <abadasa...@gmail.com> wrote:



ABADA SAMUEL

unread,
Oct 23, 2020, 5:45:40 AM10/23/20
to Devashi Jain, Matthias Sweertvaegher, Flutter Development (flutter-dev)
Your API can't live on your local machine if you want it to serve a release app. You could host your API on some server like heroku, aws, digital ocean, linode.e.t.c

Devashi Jain

unread,
Nov 11, 2020, 12:24:07 AM11/11/20
to ABADA SAMUEL, Matthias Sweertvaegher, Flutter Development (flutter-dev)
So I've hosted my apu using heroku. Is there anyway I can make my hosted heroku api connect to my local database?
Reply all
Reply to author
Forward
0 new messages