Edge Rails, Ruby 1.8.2 and "uninitialized constant 'modelnam


#1

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:inconst_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:inconst_missing’
#{RAILS_ROOT}/app/controllers/notes_controller.rb:6:in view' ./script/../config/../vendor/rails/actionpack/lib/action_controller/ base.rb:887:insend’
./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:inperform_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:inmeasure’
./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:inperform_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:inprocess_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:inprocess’
./script/…/config/…/vendor/rails/railties/lib/dispatcher.rb:38:in
dispatch' ./script/../config/../vendor/rails/railties/lib/webrick_server.rb: 117:inhandle_dispatch’
./script/…/config/…/vendor/rails/railties/lib/webrick_server.rb:
83:in service' /opt/local/lib/ruby/1.8/webrick/httpserver.rb:104:inservice’
/opt/local/lib/ruby/1.8/webrick/httpserver.rb:65:in run' /opt/local/lib/ruby/1.8/webrick/server.rb:155:instart_thread’
/opt/local/lib/ruby/1.8/webrick/server.rb:144:in start' /opt/local/lib/ruby/1.8/webrick/server.rb:144:instart_thread’
/opt/local/lib/ruby/1.8/webrick/server.rb:94:in start' /opt/local/lib/ruby/1.8/webrick/server.rb:89:ineach’
/opt/local/lib/ruby/1.8/webrick/server.rb:89:in start' /opt/local/lib/ruby/1.8/webrick/server.rb:79:instart’
/opt/local/lib/ruby/1.8/webrick/server.rb:79:in start' ./script/../config/../vendor/rails/railties/lib/webrick_server.rb: 69:indispatch’
./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:inrequire’
./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:inrequire’
script/server:3

John K.
http://www.kopanas.com

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


#2

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:instart’
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:

http://lists.rubyonrails.org/mailman/listinfo/rails
John K.
http://www.kopanas.com

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


#3

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:instart’
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:

http://lists.rubyonrails.org/mailman/listinfo/rails
John K.
http://www.kopanas.com

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


#4

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?


#5

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: http://wiki.rubyonrails.com/rails/pages/TextSearch

regards
Niklas


#6

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 - software engineering conference


Posted via http://www.ruby-forum.com/.


Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails

John K.
http://www.kopanas.com

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