Friday, 24 April 2015

Running rails application locally and make it available on public url


 However in practice you need to serve your local web server publicly.Its pretty good and easy to do that with the help of gem 'proxylocal'.

ProxyLocal proxies your local web-server and makes it publicly available over the internet. This application is splitted into client and server. The server is running on proxylocal.com. The client is written in ruby and distributed as gem.
  
1.Installation: Write inside your gem file gem 'proxylocal' or  run

gem install proxylocal inside your application.

2.Running your server: Just run your web server after that run following command 

 `proxylocal 3000 --host you_host_name` // assuming your server is running on port 3000.

now your local web server is available at:
http://ramlaxman.staging.t.proxylocal.com/


if you ar enot giving any host name in the command then proxylocal gem will give you a random path like `http://*.t.proxylocal.com/`.


references: proxylocal-gem.