# Error starting webrick in latest Rails

**URL:** <https://www.ruby-forum.com/t/error-starting-webrick-in-latest-rails/66248>\
**Category:** Rails\
**Created:** [August 24, 2006, 11:37am UTC](https://www.ruby-forum.com/t/error-starting-webrick-in-latest-rails/66248 "2006-08-24T11:37:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bmihelac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/5fc32e/32.png) [@bmihelac](https://www.ruby-forum.com/u/bmihelac)\
**Post date:** [August 24, 2006, 11:37am UTC](https://www.ruby-forum.com/t/error-starting-webrick-in-latest-rails/66248/1 "2006-08-24T11:37:39Z")

</div>

Hi all, when i try to start webrick with latest rails I got NameError  
for ActionView::Helpers::JavaScriptHelper::PrototypeHelper. On windows  
box everything works, but on linux I got folowing error:

rails tmp  
cd tmp  
svn co [http://dev.rubyonrails.org/svn/rails/trunk](http://dev.rubyonrails.org/svn/rails/trunk) vendor/rails  
ruby script/server

> ```
> ... 15 levels...
> from /usr/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'
> from ./script/../config/../vendor/rails/activesupport/lib/active_support/dependencies.rb:331:in `require'
> from ./script/../config/../vendor/rails/railties/lib/commands/server.rb:39
> from script/server:3
> 
> ```

Any idea what that could be?  
thanx,  
Bojan M.

–  
Bojan M.  
Informatika Mihelac, Bojan M. s.p. | [www.informatikamihelac.com](http://www.informatikamihelac.com)  
 → tools, scripts, tricks from our code lab: [http://source.mihelac.org](http://source.mihelac.org)

---

<div class="post-metadata">

**Author:** ![bmihelac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/5fc32e/32.png) [@bmihelac](https://www.ruby-forum.com/u/bmihelac)\
**Post date:** [August 26, 2006, 5:14pm UTC](https://www.ruby-forum.com/t/error-starting-webrick-in-latest-rails/66248/2 "2006-08-26T17:14:56Z")

</div>

Bojan M. wrote:

> > constant ActionView::Helpers::JavaScriptHelper::PrototypeHelper (NameError)  
> > from ./script/…/config/…/vendor/rails/activesupport/lib/active\_support/dependencies.rb:331:in `require’  
> > from ./script/…/config/…/vendor/rails/railties/lib/commands/server.rb:39  
> > from script/server:3
> 
> Any idea what that could be?  
> thanx,  
> Bojan M.

Still same problems with trunk, revision 4826. Rails app does not work  
on linux neither with webrick neither with fcgi, while on windows  
everything is fine.  
Anyone had similiar problem?

Bojan M.

–  
Bojan M.  
Informatika Mihelac, Bojan M. s.p. | [www.informatikamihelac.com](http://www.informatikamihelac.com)  
 → tools, scripts, tricks from our code lab: [http://source.mihelac.org](http://source.mihelac.org)

---

<div class="post-metadata">

**Author:** ![bmihelac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/5fc32e/32.png) [@bmihelac](https://www.ruby-forum.com/u/bmihelac)\
**Post date:** [August 30, 2006, 3:11am UTC](https://www.ruby-forum.com/t/error-starting-webrick-in-latest-rails/66248/3 "2006-08-30T03:11:11Z")

</div>

I had the same problem, and solved it by removing the line “include  
PrototypeHelper” (line 45) in  
vendor/rails/actionpack/lib/action\_view/helpers/javascript\_helper.rb.

It seems that the problem is that prototype\_helper.rb is loaded first,  
and it requires javascript\_helper.rb, which again requires  
prototype\_helper.rb (where PrototypeHelper is defined). Apparently,  
since parsing of prototype\_helper.rb has already started, parsing of  
javascript\_helper.rb goes on, disregarding the “require  
prototype\_helper” line so that PrototypeHelper is never defined.

It is interesting that you did not experience this problem on Windows -  
does it mean that the Ruby interpreter works differently wrt loading on  
these platforms? I suppose it does not happen on Mac either, since all  
of the core developers run Macs as far as I know, and apparently none  
of them have experienced this problem (since it is still present now,  
many revisions after you first discovered it).

Cheers,  
Anders

---

<div class="post-metadata">

**Author:** ![bmihelac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/5fc32e/32.png) [@bmihelac](https://www.ruby-forum.com/u/bmihelac)\
**Post date:** [August 30, 2006, 3:55am UTC](https://www.ruby-forum.com/t/error-starting-webrick-in-latest-rails/66248/4 "2006-08-30T03:55:14Z")

</div>

By the way, I am still not able to run webrick with the latest  
EdgeRails (revision 4867, and several earlier revisions). It starts up  
fine, but I get the following error message whenever I try to access a  
web page. Mongrel works fine, though.

MissingSourceFile (no such file to load –  
script/…/config/…/config/routes.rb):

.//vendor/rails/activesupport/lib/active\_support/dependencies.rb:343:in  
`load’

.//vendor/rails/activesupport/lib/active\_support/dependencies.rb:343:in  
`load' .//vendor/rails/actionpack/lib/action_controller/routing.rb:930:in`load\_routes!’  
.//vendor/rails/actionpack/lib/action\_controller/routing.rb:922:in  
`reload' .//vendor/rails/railties/lib/dispatcher.rb:99:in`prepare\_application’  
.//vendor/rails/railties/lib/dispatcher.rb:39:in `dispatch' .//vendor/rails/railties/lib/webrick_server.rb:111:in`handle\_dispatch’  
.//vendor/rails/railties/lib/webrick\_server.rb:77:in `service' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in`service’  
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' /usr/local/lib/ruby/1.8/webrick/server.rb:173:in`start\_thread’  
/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:95:in`start’  
/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:23:in`start’  
/usr/local/lib/ruby/1.8/webrick/server.rb:82:in `start' .//vendor/rails/railties/lib/webrick_server.rb:63:in`dispatch’  
.//vendor/rails/railties/lib/commands/servers/webrick.rb:59  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
`require’

.//vendor/rails/activesupport/lib/active\_support/dependencies.rb:350:in  
`require’  
.//vendor/rails/railties/lib/commands/server.rb:39  
./script/server:3

Anders

---

<div class="post-metadata">

**Author:** ![bmihelac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/5fc32e/32.png) [@bmihelac](https://www.ruby-forum.com/u/bmihelac)\
**Post date:** [August 30, 2006, 7:36am UTC](https://www.ruby-forum.com/t/error-starting-webrick-in-latest-rails/66248/5 "2006-08-30T07:36:58Z")

</div>

anders wrote:

> By the way, I am still not able to run webrick with the latest  
> EdgeRails (revision 4867, and several earlier revisions). It starts up  
> fine, but I get the following error message whenever I try to access a  
> web page. Mongrel works fine, though.
> 
> MissingSourceFile (no such file to load –  
> script/…/config/…/config/routes.rb):
> 
> .//vendor/rails/activesupport/lib/active\_support/dependencies.rb:343:in  
> `load’
> 
> .//vendor/rails/activesupport/lib/active\_support/dependencies.rb:343:in  
> `load' .//vendor/rails/actionpack/lib/action_controller/routing.rb:930:in`load\_routes!’  
> .//vendor/rails/actionpack/lib/action\_controller/routing.rb:922:in  
> `reload' .//vendor/rails/railties/lib/dispatcher.rb:99:in`prepare\_application’  
> .//vendor/rails/railties/lib/dispatcher.rb:39:in `dispatch' .//vendor/rails/railties/lib/webrick_server.rb:111:in`handle\_dispatch’  
> .//vendor/rails/railties/lib/webrick\_server.rb:77:in `service' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in`service’  
> /usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' /usr/local/lib/ruby/1.8/webrick/server.rb:173:in`start\_thread’  
> /usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:95:in`start’  
> /usr/local/lib/ruby/1.8/webrick/server.rb:92:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:23:in`start’  
> /usr/local/lib/ruby/1.8/webrick/server.rb:82:in `start' .//vendor/rails/railties/lib/webrick_server.rb:63:in`dispatch’  
> .//vendor/rails/railties/lib/commands/servers/webrick.rb:59  
> /usr/local/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
> `require’
> 
> .//vendor/rails/activesupport/lib/active\_support/dependencies.rb:350:in  
> `require’  
> .//vendor/rails/railties/lib/commands/server.rb:39  
> ./script/server:3
> 
> Anders

I’m on Win32 and just had the same exact problem using edge rails. My  
version of radrails doesn’t support mongrel so I had to start the server  
from a command prompt. Mongrel does work as a Windows Service - but  
that isn’t my preferred setup for development because of the restarts  
necessary. Too bad I didn’t read this post before spending an hour  
trying to figure it out!

For others who are not aware, script/server starts mongrel by default on  
edge rails - not webrick.

Michael
