开发者

Deploy Ruby on Rails - Development Environment

开发者 https://www.devze.com 2023-01-27 21:22 出处:网络
I\'m developing an small application on RoR and OSX 10.6.4 workstation, and I\'m looking for guidance on two things: -

I'm developing an small application on RoR and OSX 10.6.4 workstation, and I'm looking for guidance on two things: -

  1. How to share my application locally with others so others in my team can get access to my local webserver (Mongrel?) to view/play with my system before I release it into production. From my default installation I c开发者_开发百科an play with it both others can't seem to access it - not even from say http://:3000, which works from local - so I'm a bit confused.
  2. Advice on how best to deploy it onto a production webserver assuming I deploy onto Linux. What webserver should I use and are there instructions?

Thanks in advance. Networking and webservers are NOT a strong suite :-)

Cheers

B


The development Mongrel is by default only accessible through localhost. In order to be visible from the outside you need to ask it to bind to your external IP address. Assuming your IP address is 10.0.0.5, you need to do this:

script/server -b 10.0.0.5

For deployment on Linux, the easiest way is perhaps using Passenger, and either Apache or nginx for a web server, whichever you're most comfortable with (if you have no preference, go with Apache). Documentation can be found here.


Why can't others access it via http://your.ip:3000/? ./script/server mongrel listens on 0.0.0.0 by default. 0.0.0.0 stands for listening on every interface in Linux.

0

精彩评论

暂无评论...
验证码 换一张
取 消