# Noob question about development mode

**URL:** <https://www.ruby-forum.com/t/noob-question-about-development-mode/158178>\
**Category:** Rails\
**Created:** [January 20, 2009, 6:35am UTC](https://www.ruby-forum.com/t/noob-question-about-development-mode/158178 "2009-01-20T06:35:28Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![expozen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/f4b2a3/32.png) [@expozen](https://www.ruby-forum.com/u/expozen)\
**Post date:** [January 20, 2009, 6:35am UTC](https://www.ruby-forum.com/t/noob-question-about-development-mode/158178/1 "2009-01-20T06:35:28Z")

</div>

I’m new to Ruby and have just installed Rails. I wondering if there is a  
way to add an ip address to be used for development mode, it seems to  
default to localhost. I would like to view the Rails applications I  
development from a browser other than the on installed locally. When I  
try to do this now, all the page requests are directed to production  
mode (I’m quessing because to source ip address isn’t 127.0.0.1). Is  
there some way to direct requests made from 192.168.0.3 to use  
development mode?

---

<div class="post-metadata">

**Author:** ![expozen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/f4b2a3/32.png) [@expozen](https://www.ruby-forum.com/u/expozen)\
**Post date:** [January 20, 2009, 9:35am UTC](https://www.ruby-forum.com/t/noob-question-about-development-mode/158178/2 "2009-01-20T09:35:45Z")

</div>

you should be able to access your app in development mode from any  
browser on your network :

just type in the ip address of your server (the one with the rails  
app) and port 3000 (the default port when running the built-in server  
in dev mode)

eg if your server ip address is 192.168.0.1 then

[http://192.168.0.1:3000](http://192.168.0.1:3000) from any browser on your network

hope this helps !

Rob

On Jan 20, 4:35 pm, Kyle W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![expozen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/f4b2a3/32.png) [@expozen](https://www.ruby-forum.com/u/expozen)\
**Post date:** [January 20, 2009, 5:14pm UTC](https://www.ruby-forum.com/t/noob-question-about-development-mode/158178/3 "2009-01-20T17:14:47Z")

</div>

Rob Zolkos wrote:

> you should be able to access your app in development mode from any  
> browser on your network :
> 
> just type in the ip address of your server (the one with the rails  
> app) and port 3000 (the default port when running the built-in server  
> in dev mode)
> 
> eg if your server ip address is 192.168.0.1 then
> 
> [http://192.168.0.1:3000](http://192.168.0.1:3000) from any browser on your network
> 
> hope this helps !
> 
> Rob
> 
> On Jan 20, 4:35ï¿½pm, Kyle W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

That helps a lot! The guide I’ve been following never actually explained  
why port 3000 was to be used, and I never got it working because I had  
ignorantly specified port 80 for the Apache virtual host I added. I’ve  
added a new virtual host for development that uses port 3000 and  
everything works the way you explained. Thank you for the help, Rob.

---

<div class="post-metadata">

**Author:** ![expozen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/f4b2a3/32.png) [@expozen](https://www.ruby-forum.com/u/expozen)\
**Post date:** [January 22, 2009, 2:01am UTC](https://www.ruby-forum.com/t/noob-question-about-development-mode/158178/4 "2009-01-22T02:01:35Z")

</div>

Kyle W. wrote:

> If not, does someone know what I could be missing in my Apache  
> configuration that is keeping me from accessing development mode?

Are you using Passenger (mod\_rails)? If so, you need to add the  
“RailsEnv development” option to your VirtualHost config.

–  
Rails Wheels - Find Plugins, List & Sell Plugins -  
[http://railswheels.com](http://railswheels.com)

---

<div class="post-metadata">

**Author:** ![expozen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/f4b2a3/32.png) [@expozen](https://www.ruby-forum.com/u/expozen)\
**Post date:** [January 22, 2009, 3:34am UTC](https://www.ruby-forum.com/t/noob-question-about-development-mode/158178/5 "2009-01-22T03:34:04Z")

</div>

are you trying to develop on your local machine?

---

<div class="post-metadata">

**Author:** ![expozen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/f4b2a3/32.png) [@expozen](https://www.ruby-forum.com/u/expozen)\
**Post date:** [January 22, 2009, 5:24am UTC](https://www.ruby-forum.com/t/noob-question-about-development-mode/158178/6 "2009-01-22T05:24:40Z")

</div>

Mark Reginald J. wrote:

> Kyle W. wrote:
> 
> > If not, does someone know what I could be missing in my Apache  
> > configuration that is keeping me from accessing development mode?
> 
> Are you using Passenger (mod\_rails)? If so, you need to add the  
> “RailsEnv development” option to your VirtualHost config.
> 
> –  
> Rails Wheels - Find Plugins, List & Sell Plugins -  
> [http://railswheels.com](http://railswheels.com)

Yes, I am using Passenger. The RailsEnv option was the fix. Thanks for  
the Reply, I don’t think I would have found that one. I was busy looking  
though the Apache and Rails options; I kind of forgot that I even  
installed Passenger.

Jason White wrote:

> are you trying to develop on your local machine?

I’m trying to develop on a local server from another machine. It’s  
probably not the easiest/best way to go but I don’t really know enough  
to know the difference yet…

---

<div class="post-metadata">

**Author:** ![expozen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/f4b2a3/32.png) [@expozen](https://www.ruby-forum.com/u/expozen)\
**Post date:** [January 21, 2009, 7:09am UTC](https://www.ruby-forum.com/t/noob-question-about-development-mode/158178/7 "2009-01-21T07:09:57Z")

</div>

Okay, I think that I may have spoken too soon.

I’ve been following this guide  
[http://guides.rubyonrails.org/getting\_started\_with\_rails.html](http://guides.rubyonrails.org/getting_started_with_rails.html)  
and nothing seems to work. Can anyone recommend a better guide for a  
beginner?

To get port 3000 to work correctly I configured Apache with the  
following virtual host:

Listen 3000  
NameVirtualHost 192.168.0.1:\*  
\<VirtualHost 192.168.0.1:\*\>  
ServerName [blog.cadimize.com](http://blog.cadimize.com)  
DocumentRoot /home/toper/www/cadimize/blog/public

This makes development mode SEEM like it works, I can access my app from  
port 3000, but when there’s an error it gets logged to  
config/production.log (so it’s not in actually development mode).

When I use the WEBrick server, development mode does work, and errors  
are logged to config/development.log. But then I can only view my app at  
127.0.0.1. When WEBrick starts it says: “Rails 2.1.0 application started  
on [http://127.0.0.1:3000](http://127.0.0.1:3000)”

My questions are:  
Does development mode only work with the WEBrick server?  
If so, I assume I need to configure it to use an address other than  
127.0.0.1?  
If not, does someone know what I could be missing in my Apache  
configuration that is keeping me from accessing development mode?

---

<div class="post-metadata">

**Author:** ![expozen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/f4b2a3/32.png) [@expozen](https://www.ruby-forum.com/u/expozen)\
**Post date:** [January 22, 2009, 5:46am UTC](https://www.ruby-forum.com/t/noob-question-about-development-mode/158178/8 "2009-01-22T05:46:20Z")

</div>

Interesting way of doing things, and I’m not 100% sure what your OS  
environments on your machines are, but it really is kind of nice to be  
able to develop on separate machines with something as simple as “thin  
start” on the machine and the using Git to handle the source.

Just an idea.

On Jan 21, 10:24 pm, Kyle W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
