Topic: WEBrick error when starting up.

Hi All,

I have been looking for several hours on this problem and haven't come across a concrete solution. Always whispers and the promise of an answer, but none.

So, sleep deprived, highly caffeinated, and at my wits end, I am posting here for some help.

I am using Ubuntu Dapper Drake.

Used both the quick and proper methods found here:

The proper worked, except rubygems wouldn't work, I couldn't install rails, or rmagick which i need. I have another ubuntu box which I was developing on and everything went fine there, but here, everytime I try to start webrick I get this:

user@Server:~/www/myApp$ ruby script/server
./script/../config/boot.rb:16:in `require': no such file to load -- script/../config/../vendor/rails/railties/lib/initializer (LoadError)
        from ./script/../config/boot.rb:16
        from script/server:2

The server, console etc simply don't work. I uninstalled rubygems etc, and reinstalled it in various ways. I had this same problem on a windows box. Basically, it seems to want there to be a RAILS_ROOT/vendors/rails...etc directory, which there isn't, so then it tries to load rubygems, and badda boom nothing.

I have seen that others have had this error, but I haven't found a solution.

Any help, recommendations would be helpful.


Re: WEBrick error when starting up.


I still haven't found a good solution, however, I decided a hack might work. So I did some poking around, it seems that this evaluates to true:


Weird, I don't know where this is, but I guess the dir exists, but there isn't an initializer, so that fails, so what I did, is this:

#require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"

I commented out the require, and the else, that way, it just requires rubygems anyway. I fired up webrick (Mongrel didn't want to start...?) and badda boom, it worked, more or less. The application performs as expected, which is nice, I just don't like doing it this way. If the error happened, it means I am missing something that is obviously expected to be there, it might be required in the future, so I will keep looking into the problem, and maybe someone here will help clue me in as to why this might be happening...Maybe it has been solved elsewhere and I am not paying enough attention? A link to the solution or any discussions on this error/problem would be much appreciated.

Why would #{RAILS_ROOT}/vendor/rails/railties/lib/initializer just not be there? How did I mess this up, I don't know. Does someone have a copy of this file? What package puts it there? Oh well.

As I said, this is not a good solution, it just works, any help would be appreciated.