Advanced problem after deployment. help please

i have deployed my app with capistrano and everything works fine …
apart from that my application does not load my classes somehow. i am
trying to figure out the problem for couple of days now but i have no
clou … on dev environment everything is working fine. i really
appreciate every help cause i am stuck…

setup:
rails 2.0.1 (with rails 1.2.6 the same happend)
mongrel cluster
ubuntu linux

here is the error i get

NameError in Home#index

Showing layouts/default.rhtml where line #24 raised:

uninitialized constant ActionView::Base::CompiledTemplates::Q2

Extracted source (around line #24):

21:


22:

23:

24: <% Q2::COUNTRIES.keys.each do |c| %>
25: <%= image_tag “flag_#{c}.gif”, :title => 'wechsle zu ’
  • Q2::COUNTRIES[c] %>
    26: <% end %>
    27:

RAILS_ROOT: /var/www/quadratmeter/releases/20071218230528
Application Trace | Framework Trace | Full Trace

/var/lib/gems/1.8/gems/activesupport-2.0.1/lib/active_support/dependencies.rb:263:in
load_missing_constant' /var/lib/gems/1.8/gems/activesupport-2.0.1/lib/active_support/dependencies.rb:453:inconst_missing’
app/views/layouts/default.rhtml:24:in
_run_rhtml_47app47views47layouts47default46rhtml' /var/lib/gems/1.8/gems/actionpack-2.0.1/lib/action_view/base.rb:390:insend’
/var/lib/gems/1.8/gems/actionpack-2.0.1/lib/action_view/base.rb:390:in
compile_and_render_template' /var/lib/gems/1.8/gems/actionpack-2.0.1/lib/action_view/base.rb:366:inrender_template’
/var/lib/gems/1.8/gems/actionpack-2.0.1/lib/action_view/base.rb:316:in
render_file' /var/lib/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/layout.rb:267:inrender_without_benchmark’
/var/lib/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/benchmarking.rb:51:in
render' /var/lib/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/benchmarking.rb:51:inrender’
/var/lib/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/base.rb:1163:in
default_render' /var/lib/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/base.rb:1169:inperform_action_without_filters’
/var/lib/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/filters.rb:697:in
call_filters' /var/lib/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/filters.rb:689:inperform_action_without_benchmark’
/var/lib/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/benchmarking.rb:68:in
perform_action_without_rescue' /var/lib/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/benchmarking.rb:68:inperform_action_without_rescue’
/var/lib/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/rescue.rb:199:in
perform_action_without_caching' /var/lib/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/caching.rb:678:inperform_action’
/var/lib/gems/1.8/gems/activerecord-2.0.1/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in
cache' /var/lib/gems/1.8/gems/activerecord-2.0.1/lib/active_record/query_cache.rb:8:incache’
/var/lib/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/caching.rb:677:in
perform_action' /var/lib/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/base.rb:524:insend’
/var/lib/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/base.rb:524:in
process_without_filters' /var/lib/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/filters.rb:685:inprocess_without_session_management_support’
/var/lib/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/session_management.rb:123:in
process' /var/lib/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/base.rb:388:inprocess’
/var/lib/gems/1.8/gems/mongrel-1.1.1/lib/mongrel/rails.rb:76:in
process' /var/lib/gems/1.8/gems/mongrel-1.1.1/lib/mongrel/rails.rb:74:insynchronize’
/var/lib/gems/1.8/gems/mongrel-1.1.1/lib/mongrel/rails.rb:74:in
process' /var/lib/gems/1.8/gems/mongrel-1.1.1/lib/mongrel.rb:155:inprocess_client’
/var/lib/gems/1.8/gems/mongrel-1.1.1/lib/mongrel.rb:154:in each' /var/lib/gems/1.8/gems/mongrel-1.1.1/lib/mongrel.rb:154:inprocess_client’
/var/lib/gems/1.8/gems/mongrel-1.1.1/lib/mongrel.rb:281:in run' /var/lib/gems/1.8/gems/mongrel-1.1.1/lib/mongrel.rb:281:ininitialize’
/var/lib/gems/1.8/gems/mongrel-1.1.1/lib/mongrel.rb:281:in new' /var/lib/gems/1.8/gems/mongrel-1.1.1/lib/mongrel.rb:281:inrun’
/var/lib/gems/1.8/gems/mongrel-1.1.1/lib/mongrel.rb:264:in initialize' /var/lib/gems/1.8/gems/mongrel-1.1.1/lib/mongrel.rb:264:innew’
/var/lib/gems/1.8/gems/mongrel-1.1.1/lib/mongrel.rb:264:in run' /var/lib/gems/1.8/gems/mongrel-1.1.1/lib/mongrel/configurator.rb:282:inrun’
/var/lib/gems/1.8/gems/mongrel-1.1.1/lib/mongrel/configurator.rb:281:in
each' /var/lib/gems/1.8/gems/mongrel-1.1.1/lib/mongrel/configurator.rb:281:inrun’
/var/lib/gems/1.8/gems/mongrel-1.1.1/bin/mongrel_rails:128:in run' /var/lib/gems/1.8/gems/mongrel-1.1.1/lib/mongrel/command.rb:212:inrun’
/var/lib/gems/1.8/gems/mongrel-1.1.1/bin/mongrel_rails:281
/usr/bin/mongrel_rails:16:in `load’
/usr/bin/mongrel_rails:16

does no one has a clue … just a hint or something … i am stuck with
this…
can it be that this is a path problem?

On 18 Dec 2007, at 23:12, Michal G. wrote:

ubuntu linux

here is the error i get

NameError in Home#index

Showing layouts/default.rhtml where line #24 raised:

uninitialized constant ActionView::Base::CompiledTemplates::Q2
Where is Q2 defined ?

Fred

Q2 is my own class located in /app/models/Q2.rb

the content of it is

class Q2
COUNTRIES = {
‘AT’ => ‘Österreich’,
‘DE’ => ‘Deutschland’,
‘CH’ => ‘Schweiz’
}
end

on my development machine this class is loaded fine. everything is fine
on the development machine … i have no clue how to find this bug.
i owe you a beer for your help :wink:

do you need more information?

On 19 Dec 2007, at 15:44, Michal G. wrote:

}
end

on my development machine this class is loaded fine. everything is
fine
on the development machine … i have no clue how to find this bug.
i owe you a beer for your help :wink:

Change your filename to q2.rb
I’ll bet a beer that your development machine has a non case sensitive
filesystem whereas your servers do have case sensitive filesystems

Fred

hey fred i do really owe you a beer or even two!!! it works … thanks
a lot for spending your time with this …

conclusion: all my files should be lower case?

thanks a lot! you saved my life :slight_smile:

On 19 Dec 2007, at 17:15, Michal G. wrote:

hey fred i do really owe you a beer or even two!!! it works …
thanks
a lot for spending your time with this …

conclusion: all my files should be lower case?

As far as the rails conventions go, it’s lowercase all the way
Fred

Michal G. wrote:

thanks a lot! you saved my life :slight_smile:

does fred get a reward?

yeah a beer if we meet the next time … for sure!