# Problem with webrick and edge rails

**URL:** <https://www.ruby-forum.com/t/problem-with-webrick-and-edge-rails/55242>\
**Category:** Rails\
**Created:** [March 18, 2006, 2:08pm UTC](https://www.ruby-forum.com/t/problem-with-webrick-and-edge-rails/55242 "2006-03-18T14:08:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![empty\_body](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/c4cdca/32.png) [@empty\_body](https://www.ruby-forum.com/u/empty_body)\
**Post date:** [March 18, 2006, 2:08pm UTC](https://www.ruby-forum.com/t/problem-with-webrick-and-edge-rails/55242/1 "2006-03-18T14:08:28Z")

</div>

i know i do not really have the right to seek help with edge rails,  
but i am hoping it is something trivial.

quick scenario:

$ rails test # create a new project  
$ svn import # import it into the repo, then go elsewhere, and checkout  
$ ruby script/server  
=\> Booting WEBrick…  
=\> Rails application started on [http://0.0.0.0:3000](http://0.0.0.0:3000)  
=\> Ctrl-C to shutdown server; call with --help for options  
[2006-03-18 07:19:57] INFO WEBrick 1.3.1  
[2006-03-18 07:19:57] INFO ruby 1.8.4 (2005-12-24) [i686-linux]  
[2006-03-18 07:19:57] INFO WEBrick::HTTPServer#start: pid=2676  
port=3000  
[2006-03-18 07:20:02] INFO going to shutdown …  
[2006-03-18 07:20:02] INFO WEBrick::HTTPServer#start done.

no problem, webrick starts up and all is good.

now i switch to edge rails:  
$ svn propset svn:externals “rails  
[http://dev.rubyonrails.org/svn/rails/trunk](http://dev.rubyonrails.org/svn/rails/trunk)” .  
$ svn up  
[skipped]  
Updated external to revision 3922.

here’s the error:

* * *

## $ ruby script/server =\> Booting WEBrick… ./script/…/config/…/vendor/rails/railties/lib/commands/…/tasks/tmp.rake:1: undefined method `namespace' for main:Object (NoMethodError) from ./script/../config/../vendor/rails/activesupport/lib/active_support/dependencies.rb:142:in `load’ from ./script/…/config/…/vendor/rails/railties/lib/commands/server.rb:29 from script/server:3

or even simpler:

* * *

## $ ruby script/server -h =\> Booting WEBrick… ./script/…/config/…/vendor/rails/railties/lib/commands/…/tasks/tmp.rake:1: undefined method `namespace' for main:Object (NoMethodError) from ./script/../config/../vendor/rails/activesupport/lib/active_support/dependencies.rb:142:in `load’ from ./script/…/config/…/vendor/rails/railties/lib/commands/server.rb:29 from script/server:3

here’s the environment:

$ rake --version  
rake, version 0.7.0  
$ rails --version  
Rails 1.0.0  
$ ruby --version  
ruby 1.8.4 (2005-12-24) [i686-linux]  
$ uname -a  
Linux 2.6.15-gentoo-r1 #1 PREEMPT Thu Feb 2 00:48:08 EST 2006 i686  
Pentium III (Katmai) GenuineIntel GNU/Linux

the interesting thing is that the same exact scenario works on cygwin  
without any problems with exactly the same revision from rails trunk:

$ # do the whole rails test / svn import / svn co / svn externals / svn  
up dance  
$ ruby script/server  
=\> Booting WEBrick…  
=\> Rails application started on [http://0.0.0.0:3000](http://0.0.0.0:3000)  
=\> Ctrl-C to shutdown server; call with --help for options  
[2006-03-18 07:51:27] INFO WEBrick 1.3.1  
[2006-03-18 07:51:27] INFO ruby 1.8.4 (2005-12-24) [i386-cygwin]  
[2006-03-18 07:51:27] INFO WEBrick::HTTPServer#start: pid=1012  
port=3000  
[2006-03-18 07:51:34] INFO going to shutdown …  
[2006-03-18 07:51:34] INFO WEBrick::HTTPServer#start done.

$ rake --version  
rake, version 0.7.0  
$ rails --version  
Rails 1.0.0  
$ ruby --version  
ruby 1.8.4 (2005-12-24) [i386-cygwin]  
$ uname -a  
CYGWIN\_NT-5.1 1.5.19(0.150/4/2) 2006-01-20 13:28 i686 Cygwin

in the past 24 hours i’ve tried about 5 latest revisions from rails  
trunk, and the result is always the same.

i hope i am missing something obvious; at this point i am out of  
ideas. any suggestions are welcome.

thank you.

-a

---

<div class="post-metadata">

**Author:** ![empty\_body](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/c4cdca/32.png) [@empty\_body](https://www.ruby-forum.com/u/empty_body)\
**Post date:** [March 18, 2006, 7:40pm UTC](https://www.ruby-forum.com/t/problem-with-webrick-and-edge-rails/55242/2 "2006-03-18T19:40:53Z")

</div>

so everything points to the fact that somehow my install is using an  
older version of rake that does not understand namespaces.

i can confirm this by editing  
vendor/rails/railties/lib/commands/server.rb and adding the following  
line:  
puts “rake version is #{Rake::Application::RAKEVERSION}”

right after the line:  
require\_library\_or\_gem ‘rake’

the output is: rake version is 0.6.2

now i know what the problem is (it should have been rails 0.7.0, which  
is what my cygwin setup outputs), how do i fix it (and for all my  
projects)? even before posting i have reinstalled rails gem and  
confirmed that i indeed had rake 0.7.0. i even ran gem cleanup.

thank you for any input.

-a

---

<div class="post-metadata">

**Author:** ![empty\_body](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/c4cdca/32.png) [@empty\_body](https://www.ruby-forum.com/u/empty_body)\
**Post date:** [March 18, 2006, 8:35pm UTC](https://www.ruby-forum.com/t/problem-with-webrick-and-edge-rails/55242/3 "2006-03-18T20:35:28Z")

</div>

SOLVED

continuing down the winding path of recollection, i did remember that  
at some point out of sheer “hey ma, see what i can do” interest i have  
installed rake package with the OS (emerge rake); then i promptly  
forgot about it, since i started using gems. that old rake package was  
0.6.2.

there was an old rake binary in /usr/lib/ruby/gems/1.8/bin and it was  
taking precendence over everything else.

thus uninstalling the package (emerge unmerge rake) solved the problem.

in retrospect it was pretty trivial. hope this posting helps someone in  
future.

-a
