# Need to restart server every time a controller is generated?

**URL:** <https://www.ruby-forum.com/t/need-to-restart-server-every-time-a-controller-is-generated/166179>\
**Category:** Rails\
**Created:** [April 22, 2009, 4:14pm UTC](https://www.ruby-forum.com/t/need-to-restart-server-every-time-a-controller-is-generated/166179 "2009-04-22T16:14:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![winterheat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7993a0/32.png) [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Post date:** [April 22, 2009, 4:14pm UTC](https://www.ruby-forum.com/t/need-to-restart-server-every-time-a-controller-is-generated/166179/1 "2009-04-22T16:14:27Z")

</div>

i thought we don’t need to restart the server by

ruby script/server

after we use

ruby script/generate controller Bar index help

?

but if i don’t restart the server, it will say for localhost:3000/bar

Routing Error

No route matches “/bar” with {:method=\>:get}

is it true that we need to restart the server or is there a fast way  
instead? thanks.

---

<div class="post-metadata">

**Author:** ![winterheat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7993a0/32.png) [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Post date:** [April 22, 2009, 6:00pm UTC](https://www.ruby-forum.com/t/need-to-restart-server-every-time-a-controller-is-generated/166179/2 "2009-04-22T18:00:00Z")

</div>

On Apr 22, 2009, at 7:14 AM, SpringFlowers AutumnMoon wrote:

> but if i don’t restart the server, it will say for localhost:3000/bar
> 
> Routing Error
> 
> No route matches “/bar” with {:method=\>:get}
> 
> is it true that we need to restart the server or is there a fast way  
> instead? thanks.

You need to restart the server when you add controllers. If you are  
just changing them then you don’t.

---

<div class="post-metadata">

**Author:** ![winterheat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7993a0/32.png) [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Post date:** [April 22, 2009, 6:04pm UTC](https://www.ruby-forum.com/t/need-to-restart-server-every-time-a-controller-is-generated/166179/3 "2009-04-22T18:04:43Z")

</div>

Philip H. wrote:

> On Apr 22, 2009, at 7:14 AM, SpringFlowers AutumnMoon wrote:
> 
> > but if i don’t restart the server, it will say for localhost:3000/bar
> > 
> > Routing Error
> > 
> > No route matches “/bar” with {:method=\>:get}
> > 
> > is it true that we need to restart the server or is there a fast way  
> > instead? thanks.
> 
> You need to restart the server when you add controllers. If you are  
> just changing them then you don’t.

oh i just tried Rails 1.2.6 on my macbook. seems like here, we don’t  
need to restart server. maybe we only need to restart when it is Rails  
2.0 and above? thanks.

---

<div class="post-metadata">

**Author:** ![winterheat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7993a0/32.png) [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Post date:** [April 22, 2009, 6:31pm UTC](https://www.ruby-forum.com/t/need-to-restart-server-every-time-a-controller-is-generated/166179/4 "2009-04-22T18:31:38Z")

</div>

Philip H. wrote:

> > > You need to restart the server when you add controllers. If you are  
> > > just changing them then you don’t.
> > 
> > oh i just tried Rails 1.2.6 on my macbook. seems like here, we don’t  
> > need to restart server. maybe we only need to restart when it is  
> > Rails  
> > 2.0 and above? thanks.
> 
> Maybe. 1.2.6 was a long time ago. If this is a new project you  
> should drop that quick and get 2.3.x… a lot has changed since 1.2.6.

can’t 1.2.6 and 2.3 both build a website that is quite “Rails”? what  
function or speed enhancement can be obtained? it is said that Ruby 1.9  
is a lot faster but i wonder if Ruby 1.9 can be used with Rails 2.3?  
thanks

---

<div class="post-metadata">

**Author:** ![winterheat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7993a0/32.png) [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Post date:** [April 22, 2009, 6:22pm UTC](https://www.ruby-forum.com/t/need-to-restart-server-every-time-a-controller-is-generated/166179/5 "2009-04-22T18:22:18Z")

</div>

> > You need to restart the server when you add controllers. If you are  
> > just changing them then you don’t.
> 
> oh i just tried Rails 1.2.6 on my macbook. seems like here, we don’t  
> need to restart server. maybe we only need to restart when it is  
> Rails  
> 2.0 and above? thanks.

Maybe. 1.2.6 was a long time ago. If this is a new project you  
should drop that quick and get 2.3.x… a lot has changed since 1.2.6.
