Question

I'm developing the mobile version of my site, which is a rails app. I use mobile_device? to see where the user is coming from, and if it's a mobile phone, they're directed to different views than the desktop version.

All I have in my application.mobile.erb file at present is a message, 'Mobile site being developed', which comes up correctly on my mobile.

Is it really the case that I have to deploy just to test the site on my mobile phone? I thought there's be a good emulator or equivalent but the ones I've tried jut show my desktop version, shrunken to mobile phone size.

Was it helpful?

Solution 2

I solved my problem brilliantly with the proxylocal gem at http://proxylocal.com.

Simply install the gem. In Terminal type $proxylocal 3000

Then your server is available to your mobile or any other device at something like http://fp9k.t.proxylocal.com/

You can make it available at something more user friendly by opening another window in Terminal and typing: $proxylocal 3000 --host testhost

Then your site will be available at http://testhost.t.proxylocal.com/

OTHER TIPS

Use Chrome developer tools to change the UA to a mobile phone. You can set the resolution of your monitor to replicate that of a mobile phone. Then you can test on a local server on your desktop without much issues.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top