# Problem with starting WEBrick

**URL:** <https://www.ruby-forum.com/t/problem-with-starting-webrick/102976>\
**Category:** Rails\
**Created:** [July 10, 2006, 7:55pm UTC](https://www.ruby-forum.com/t/problem-with-starting-webrick/102976 "2006-07-10T19:55:30Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikki](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bcef8e/32.png) [@mikki](https://www.ruby-forum.com/u/mikki)\
**Post date:** [July 10, 2006, 7:55pm UTC](https://www.ruby-forum.com/t/problem-with-starting-webrick/102976/1 "2006-07-10T19:55:30Z")

</div>

Following is the error I get when I run ‘\root\ ruby script\server’  
The server does not starts.  
Any help !?!

* * *

## =\> Booting WEBrick… c:/ruby/lib/ruby/gems/1.8/gems/xml-simple-1.0.8/lib/xmlsimple.rb:275: warning: already initialized constant KNOWN\_OPTIONS c:/ruby/lib/ruby/gems/1.8/gems/xml-simple-1.0.8/lib/xmlsimple.rb:280: warning: already initialized constant DEF\_KEY\_ATTRIBUTES c:/ruby/lib/ruby/gems/1.8/gems/xml-simple-1.0.8/lib/xmlsimple.rb:281: warning: already initialized constant DEF\_ROOT\_NAME c:/ruby/lib/ruby/gems/1.8/gems/xml-simple-1.0.8/lib/xmlsimple.rb:282: warning: already initialized constant DEF\_CONTENT\_KEY c:/ruby/lib/ruby/gems/1.8/gems/xml-simple-1.0.8/lib/xmlsimple.rb:283: warning: already initialized constant DEF\_XML\_DECLARATION c:/ruby/lib/ruby/gems/1.8/gems/xml-simple-1.0.8/lib/xmlsimple.rb:284: warning: already initialized constant DEF\_ANONYMOUS\_TAG c:/ruby/lib/ruby/gems/1.8/gems/xml-simple-1.0.8/lib/xmlsimple.rb:285: warning: already initialized constant DEF\_FORCE\_ARRAY c:/ruby/lib/ruby/gems/1.8/gems/xml-simple-1.0.8/lib/xmlsimple.rb:286: warning: already initialized constant DEF\_INDENTATION

MSN id: removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![mikki](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bcef8e/32.png) [@mikki](https://www.ruby-forum.com/u/mikki)\
**Post date:** [July 10, 2006, 8:17pm UTC](https://www.ruby-forum.com/t/problem-with-starting-webrick/102976/2 "2006-07-10T20:17:13Z")

</div>

Hi Mikki,

mikki wrote:

> Following is the error I get when I run  
> ‘\root\ ruby script\server’  
> The server does not starts.  
> Any help !?!

Just enter ‘ruby script\server’. Also, you need to start WEBrick from  
within a Rails application directory.

hth,  
Bill

---

<div class="post-metadata">

**Author:** ![mikki](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bcef8e/32.png) [@mikki](https://www.ruby-forum.com/u/mikki)\
**Post date:** [July 10, 2006, 9:04pm UTC](https://www.ruby-forum.com/t/problem-with-starting-webrick/102976/3 "2006-07-10T21:04:01Z")

</div>

mikki wrote:

> inside one of the .rb files I am using in the  
> Rails application directory, I have ‘require  
> xml-simple’,

As far as I know, the content of an application file is not going to  
have  
any impact on whether or not you’re able to start the web server. Are  
you  
able to start WEBrick in a different application directory?

Best regards,  
Bill

---

<div class="post-metadata">

**Author:** ![mikki](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bcef8e/32.png) [@mikki](https://www.ruby-forum.com/u/mikki)\
**Post date:** [July 10, 2006, 8:33pm UTC](https://www.ruby-forum.com/t/problem-with-starting-webrick/102976/4 "2006-07-10T20:33:39Z")

</div>

Hi Bill

Bill W. wrote:

> > Just enter ‘ruby script\server’.  
> > thats exactly what I did…I put down ‘root’ just for the heck of the  
> > structure.

> > Also, you need to start WEBrick from within a Rails application directory.

thats what I am doing. but inside one of the .rb files I am using in the  
Rails application directory, I have ‘require xml-simple’, which I  
believe connects to the xml-simple in the gems directory inside the Ruby  
directory. I dont know why is it giving me a problem with the server.  
look at the error msg again, see if you can make sense out of it.

-Mikki

MSN id: removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![mikki](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bcef8e/32.png) [@mikki](https://www.ruby-forum.com/u/mikki)\
**Post date:** [July 10, 2006, 9:07pm UTC](https://www.ruby-forum.com/t/problem-with-starting-webrick/102976/5 "2006-07-10T21:07:48Z")

</div>

hey Bill

Bill W. wrote:  
Are

> you  
> able to start WEBrick in a different application directory?
> 
> Best regards,  
> Bill

yes, I am able to. thanks though.  
-Mikki

MSN id: removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![mikki](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bcef8e/32.png) [@mikki](https://www.ruby-forum.com/u/mikki)\
**Post date:** [July 10, 2006, 9:43pm UTC](https://www.ruby-forum.com/t/problem-with-starting-webrick/102976/6 "2006-07-10T21:43:22Z")

</div>

Hi Mikki,

mikki wrote:

> Bill W. wrote:  
> Are
> 
> > you  
> > able to start WEBrick in a different application directory?
> 
> yes, I am able to. thanks though.

In that case, perhaps Rails had some sort of problem when it built the  
directory structure. You might try just renaming the directory and  
regenerate it. I’d try to start WEBrick right after generating the app.  
Then you’ll know for sure whether or not it has anything to do with the  
additions you’ve made. If it runs, start copying the  
model/controller/view  
directories back in. I’d do it in tuples (assuming you have more than  
one  
controller) and see if / when the problem resurfaces. If it _does_ show  
back up when you add application code, I’d recommend writing it up as a  
bug.

hth,  
Bill

---

<div class="post-metadata">

**Author:** ![mikki](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bcef8e/32.png) [@mikki](https://www.ruby-forum.com/u/mikki)\
**Post date:** [July 10, 2006, 10:45pm UTC](https://www.ruby-forum.com/t/problem-with-starting-webrick/102976/7 "2006-07-10T22:45:26Z")

</div>

Thanks for all your help Bill. Re-building the app directory now seems  
like the only solution, especially now when I have added errors to the  
same problem. and they are more weird. I ran a gem update and I guess,  
the new gems files- .rb have corrupted the /app even more.

Bill W. wrote:

> Hi Mikki,
> 
> mikki wrote:
> 
> > Bill W. wrote:  
> > Are
> > 
> > > you  
> > > able to start WEBrick in a different application directory?
> > 
> > yes, I am able to. thanks though.
> 
> In that case, perhaps Rails had some sort of problem when it built the  
> directory structure. You might try just renaming the directory and  
> regenerate it. I’d try to start WEBrick right after generating the app.  
> Then you’ll know for sure whether or not it has anything to do with the  
> additions you’ve made. If it runs, start copying the  
> model/controller/view  
> directories back in. I’d do it in tuples (assuming you have more than  
> one  
> controller) and see if / when the problem resurfaces. If it _does_ show  
> back up when you add application code, I’d recommend writing it up as a  
> bug.
> 
> hth,  
> Bill

---

<div class="post-metadata">

**Author:** ![mikki](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/bcef8e/32.png) [@mikki](https://www.ruby-forum.com/u/mikki)\
**Post date:** [July 11, 2006, 1:17am UTC](https://www.ruby-forum.com/t/problem-with-starting-webrick/102976/8 "2006-07-11T01:17:03Z")

</div>

Hi Mikki,

mikki wrote:

> Thanks for all your help Bill.

You’re very welcome!

> Re-building the app directory now seems  
> like the only solution

Luckily, in Rails, that’s a one-liner 😉 Rename your old directory  
before  
you do it and you can just copy all the stuff you’ve already done back  
in!

> I ran a gem update and I guess, the new gems  
> files- .rb have corrupted the /app even more.

That may well be the problem. The gem update give lots of folks  
problems.  
Hope you’ll let us know how it goes.

Best regards,  
Bill
