Problem with starting WEBrick

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: [email protected]

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

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

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: [email protected]

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: [email protected]

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

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

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 :wink: 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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs