# Edge Rails, Ruby 1.8.2 and "uninitialized constant 'modelnam

**URL:** <https://www.ruby-forum.com/t/edge-rails-ruby-1-8-2-and-uninitialized-constant-modelnam/69060>\
**Category:** Rails\
**Created:** [February 16, 2006, 3:47am UTC](https://www.ruby-forum.com/t/edge-rails-ruby-1-8-2-and-uninitialized-constant-modelnam/69060 "2006-02-16T03:47:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/59ef9b/32.png) [@johnk](https://www.ruby-forum.com/u/johnk)\
**Post date:** [February 16, 2006, 3:47am UTC](https://www.ruby-forum.com/t/edge-rails-ruby-1-8-2-and-uninitialized-constant-modelnam/69060/1 "2006-02-16T03:47:09Z")

</div>

I know it might seem like I am repeating myself but I can’t seem to  
find the solution to my problem. I am trying to run edge rails using  
“rake freeze\_edge” and every time I do that my application stops to  
work. I get an error on every page. I get a “uninitialized constant  
modelname” error where modelname is the object being created for that  
view

Has anyone ever seen this with edge? Your help would be greatly  
appreciated :-).

I pasted the full trace just in case that would help:

./script/…/config/…/vendor/rails/activesupport/lib/active\_support/  
dependencies.rb:110:in `const_missing' ./script/../config/../vendor/rails/activesupport/lib/active_support/ dependencies.rb:137:in `const\_missing’  
./script/…/config/…/vendor/rails/activesupport/lib/active\_support/  
dependencies.rb:139:in `send' ./script/../config/../vendor/rails/activesupport/lib/active_support/ dependencies.rb:139:in `const\_missing’  
#{RAILS\_ROOT}/app/controllers/notes\_controller.rb:6:in `view' ./script/../config/../vendor/rails/actionpack/lib/action_controller/ base.rb:887:in `send’  
./script/…/config/…/vendor/rails/actionpack/lib/action\_controller/  
base.rb:887:in `perform_action_without_filters' ./script/../config/../vendor/rails/actionpack/lib/action_controller/ filters.rb:355:in `perform\_action\_without\_benchmark’  
./script/…/config/…/vendor/rails/actionpack/lib/action\_controller/  
benchmarking.rb:69:in `perform_action_without_rescue' ./script/../config/../vendor/rails/actionpack/lib/action_controller/ benchmarking.rb:69:in `measure’  
./script/…/config/…/vendor/rails/actionpack/lib/action\_controller/  
benchmarking.rb:69:in `perform_action_without_rescue' ./script/../config/../vendor/rails/actionpack/lib/action_controller/ rescue.rb:82:in `perform\_action’  
./script/…/config/…/vendor/rails/actionpack/lib/action\_controller/  
base.rb:359:in `send' ./script/../config/../vendor/rails/actionpack/lib/action_controller/ base.rb:359:in `process\_without\_filters’  
./script/…/config/…/vendor/rails/actionpack/lib/action\_controller/  
filters.rb:364:in `process_without_session_management_support' ./script/../config/../vendor/rails/actionpack/lib/action_controller/ session_management.rb:117:in `process’  
./script/…/config/…/vendor/rails/railties/lib/dispatcher.rb:38:in  
`dispatch' ./script/../config/../vendor/rails/railties/lib/webrick_server.rb: 117:in `handle\_dispatch’  
./script/…/config/…/vendor/rails/railties/lib/webrick\_server.rb:  
83:in `service' /opt/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service’  
/opt/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' /opt/local/lib/ruby/1.8/webrick/server.rb:155:in `start\_thread’  
/opt/local/lib/ruby/1.8/webrick/server.rb:144:in `start' /opt/local/lib/ruby/1.8/webrick/server.rb:144:in `start\_thread’  
/opt/local/lib/ruby/1.8/webrick/server.rb:94:in `start' /opt/local/lib/ruby/1.8/webrick/server.rb:89:in `each’  
/opt/local/lib/ruby/1.8/webrick/server.rb:89:in `start' /opt/local/lib/ruby/1.8/webrick/server.rb:79:in `start’  
/opt/local/lib/ruby/1.8/webrick/server.rb:79:in `start' ./script/../config/../vendor/rails/railties/lib/webrick_server.rb: 69:in `dispatch’  
./script/…/config/…/vendor/rails/railties/lib/commands/servers/  
webrick.rb:59  
/opt/local/lib/ruby/vendor\_ruby/1.8/rubygems/custom\_require.rb:18:in  
`require__' /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:18:in `require’  
./script/…/config/…/vendor/rails/activesupport/lib/active\_support/  
dependencies.rb:153:in `require' ./script/../config/../vendor/rails/railties/lib/commands/server.rb:28 script/server:3:in `require’  
script/server:3

John K.  
[http://www.kopanas.com](http://www.kopanas.com)

=====================================================================  
[http://www.soen.info](http://www.soen.info) - source of the freshest software engineering  
information on the net  
[http://cusec.soen.info](http://cusec.soen.info) - software engineering conference

---

<div class="post-metadata">

**Author:** ![johnk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/59ef9b/32.png) [@johnk](https://www.ruby-forum.com/u/johnk)\
**Post date:** [February 17, 2006, 1:09am UTC](https://www.ruby-forum.com/t/edge-rails-ruby-1-8-2-and-uninitialized-constant-modelnam/69060/2 "2006-02-17T01:09:20Z")

</div>

To answer my own question… you need ruby 1.8.4 to run rails edge.  
Just in case someone was curious.

On 15-Feb-06, at 9:44 PM, John K. wrote:

> I pasted the full trace just in case that would help:  
> ./script/…/config/…/vendor/rails/actionpack/lib/action\_controller/  
> benchmarking.rb:69:in `perform_action_without_rescue' ./script/../config/../vendor/rails/railties/lib/dispatcher.rb:38:in /opt/local/lib/ruby/1.8/webrick/server.rb:94:in `start’  
> /opt/local/lib/ruby/vendor\_ruby/1.8/rubygems/custom\_require.rb:
> 
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)  
> John K.  
> [http://www.kopanas.com](http://www.kopanas.com)

=====================================================================  
[http://www.soen.info](http://www.soen.info) - source of the freshest software engineering  
information on the net  
[http://cusec.soen.info](http://cusec.soen.info) - software engineering conference

---

<div class="post-metadata">

**Author:** ![johnk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/59ef9b/32.png) [@johnk](https://www.ruby-forum.com/u/johnk)\
**Post date:** [February 17, 2006, 4:51am UTC](https://www.ruby-forum.com/t/edge-rails-ruby-1-8-2-and-uninitialized-constant-modelnam/69060/3 "2006-02-17T04:51:59Z")

</div>

Interesting… I’ve been running 1.8.2 with edge on two machines with no  
problems but today I added some engines and got the same error. Are you  
saying you can’t just:

rails foo

freeze rails, and get a working foo application?

John K. wrote:

> To answer my own question… you need ruby 1.8.4 to run rails edge.  
> Just in case someone was curious.
> 
> On 15-Feb-06, at 9:44 PM, John K. wrote:
> 
> > I pasted the full trace just in case that would help:  
> > ./script/…/config/…/vendor/rails/actionpack/lib/action\_controller/  
> > benchmarking.rb:69:in `perform_action_without_rescue' ./script/../config/../vendor/rails/railties/lib/dispatcher.rb:38:in /opt/local/lib/ruby/1.8/webrick/server.rb:94:in `start’  
> > /opt/local/lib/ruby/vendor\_ruby/1.8/rubygems/custom\_require.rb:
> > 
> > [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)  
> > John K.  
> > [http://www.kopanas.com](http://www.kopanas.com)
> 
> =====================================================================  
> [http://www.soen.info](http://www.soen.info) - source of the freshest software engineering  
> information on the net  
> [http://cusec.soen.info](http://cusec.soen.info) - software engineering conference

---

<div class="post-metadata">

**Author:** ![johnk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/59ef9b/32.png) [@johnk](https://www.ruby-forum.com/u/johnk)\
**Post date:** [March 17, 2006, 5:22am UTC](https://www.ruby-forum.com/t/edge-rails-ruby-1-8-2-and-uninitialized-constant-modelnam/69060/4 "2006-03-17T05:22:54Z")

</div>

I got 1.8.2 with actual rails from the gems. Working perfectly with  
WebRick, but ot complains about const\_missing with one of my 2 (!)  
models when I use it with Apache. It’s Version 2.0.54 with CGI, not  
f\*cgi - it’s an old SuSE and sucking like hell…

Tomorrow I will try it on my working machine with Ubuntu/breezy, report  
will follow. Any hint what I could try?

---

<div class="post-metadata">

**Author:** ![johnk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/59ef9b/32.png) [@johnk](https://www.ruby-forum.com/u/johnk)\
**Post date:** [March 19, 2006, 5:01pm UTC](https://www.ruby-forum.com/t/edge-rails-ruby-1-8-2-and-uninitialized-constant-modelnam/69060/5 "2006-03-19T17:01:47Z")

</div>

It didn’t work on my own machine either.  
But I found out that the error goes away when I remove the "require  
‘libs/search’ in my model (this one that has not been found). I used the  
TextSearch thingy for easy searching over multiple fields.

Now I have to use the code per copy+paste in the model, but whatever.  
Just wanna know why this happened?!

the lib I used: [Peak Obsession](http://wiki.rubyonrails.com/rails/pages/TextSearch)

regards  
Niklas

---

<div class="post-metadata">

**Author:** ![johnk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/59ef9b/32.png) [@johnk](https://www.ruby-forum.com/u/johnk)\
**Post date:** [February 17, 2006, 5:16am UTC](https://www.ruby-forum.com/t/edge-rails-ruby-1-8-2-and-uninitialized-constant-modelnam/69060/6 "2006-02-17T05:16:41Z")

</div>

That I do not know. I just know the application I had did not allow  
me to use edge rails on Mac OS X default install of ruby.

It could of been my use of acts\_as\_versioned or something else like  
that.

On 16-Feb-06, at 10:51 PM, Steve R. wrote:

> > > ./script/…/config/…/vendor/rails/railties/lib/dispatcher.rb:38:in  
> > > information on the net  
> > > [http://cusec.soen.info](http://cusec.soen.info) - software engineering conference
> 
> –  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

John K.  
[http://www.kopanas.com](http://www.kopanas.com)

=====================================================================  
[http://www.soen.info](http://www.soen.info) - source of the freshest software engineering  
information on the net  
[http://cusec.soen.info](http://cusec.soen.info) - software engineering conference
