loading...
Cover image for Developing React.JS/Rails App On Mobile Device(other than iDevices).

Developing React.JS/Rails App On Mobile Device(other than iDevices).

tpatterson profile image Tanner Patterson ・3 min read

I have always had a random need, to turn anything small enough and powerful that has a screen, into a device that can run a full desktop OS.

This obviously comes with limits and serious questions as to why anyone would do that to themselves, but I can’t answer the question part even for myself to be honest, other than I just like seeing what these devices are capable of.

The first start to this GRAND😬 adventure, is make sure you are using pretty much ANYTHING other than an apple device(and windows phone kinda), which is a sad day because I own/owned almost every type of major product that Apple sells and it would have be fun to do this across their different OS’s.

Ok now that you are not on an apple device, I found a website that walked me through the step to get the Google Play Store on a kindle and it might be useful in other situations where you are able to install and use APK’s. I don’t want to re-invent the wheel so you should just give the article a read here and it will help get the play store set up.
https://www.google.com/amp/s/www.howtogeek.com/232726/how-to-install-the-google-play-store-on-your-amazon-fire-tablet/amp/

Once you have downloaded the APK’s it’s time to install Termux. Termux is a great IDE and is full of functionality.

I also want to point out here that as a coder I knew there would be people who had similar questions and problem I did while do with so I am going to be using a lot of external websites to reference but they are great reads and I don’t want to steal they’re hard work.

Once Termux is install we need to set up or work environment.
https://mbobin.me/ruby/2017/02/25/ruby-on-rails-on-android.html
This website Above will walk you through setting up most of your rails project but take what you need and there might still be issues with some gems in your specific case and the ruby version.

Checkout your package.json file and change the ruby version to the correct version and then in my case I hade issues with Bcrypt and I found a video of some one using metasploit to get around it. You are going to need to change the version of bcrypt in you package.json file to the same version in the video. here:https://asciinema.org/a/a1dRt0drHpSbYQ5tXmvBf3eRE

I also ran into an issue using semantic-ui-react with Termux and found a website that quickly explained all you need to do run npm install fomantic-ui and again with fomantic-ui-css. You need to add these to your package.json file. Check it out her for a more in depth explanation. https://hackernoon.com/code-a-react-website-on-your-android-smartphone-or-tablet-like-you-never-imagined-3e56c534f6e7.

After that you should be pretty set to either start brand new on either your front end or backend but in my case I started with a project from GitHub and I have been making little adjustments to my project when I’m out and about.

I hope this helps you or just sparks some creativity for you. I will definitely be back in here to update this blog more as I learn more them but for now Ta-Ta!

Posted on by:

tpatterson profile

Tanner Patterson

@tpatterson

Software Engineer | fitness fan | gaming enthusiast

Discussion

markdown guide