Ticket #11 (closed defect: worksforme)

Opened 2 years ago

Last modified 2 years ago

edge rails still broken?

Reported by: anonymous Assigned to: matthew
Priority: major Component: core
Version: Keywords:
Cc:

Description

Still getting the following on edge rails. Where is 'site' getting pushed into the template?


 NoMethodError in Auto_admin#index

Showing vendor/plugins/auto-admin/themes/django/views/layout.rhtml where line #5 raised:

You have a nil object when you didn't expect it!
The error occurred while evaluating nil.name

Extracted source (around line #5):

2:   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3: <html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" xml:lang="en-us">
4: <head>
5:   <title><%=h @title ? "#{@title} | " : '' %><%=h site.name %></title>
6:   <%= tag("link", { "rel" => "Stylesheet", "type" => "text/css", "media" => "screen", "href" => url_for( :action => 'asset', :path => 'stylesheets/auto_admin.css', :escape => false ) } ) %>
7: </head>
8: 

RAILS_ROOT: /sites/stirr.net/public/../config/..
Application Trace | Framework Trace | Full Trace

#{RAILS_ROOT}/vendor/plugins/auto-admin/themes/django/views/layout.rhtml:5:in `_run_rhtml_47vendor47plugins47auto45admin47themes47django47views47layout46rhtml'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb:317:in `compile_and_render_template'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb:293:in `render_template'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb:252:in `render_file'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/layout.rb:254:in `render_without_benchmark'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:50:in `render'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:50:in `render'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/base.rb:981:in `perform_action_without_filters'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:363:in `perform_action_without_benchmark'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/rescue.rb:80:in `perform_action'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/base.rb:408:in `process_without_filters'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:372:in `process_without_session_management_support'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/session_management.rb:114:in `process'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/base.rb:319:in `process'
#{RAILS_ROOT}/vendor/rails/railties/lib/dispatcher.rb:41:in `dispatch'
#{RAILS_ROOT}/vendor/rails/railties/lib/fcgi_handler.rb:150:in `process_request'
#{RAILS_ROOT}/vendor/rails/railties/lib/fcgi_handler.rb:54:in `process!'
/usr/lib/ruby/1.8/fcgi.rb:600:in `each_cgi'
/usr/lib/ruby/1.8/fcgi.rb:597:in `each_cgi'
#{RAILS_ROOT}/vendor/rails/railties/lib/fcgi_handler.rb:53:in `process!'
#{RAILS_ROOT}/vendor/rails/railties/lib/fcgi_handler.rb:23:in `process!'
/sites/stirr.net/public/dispatch.fcgi:24

#{RAILS_ROOT}/vendor/plugins/auto-admin/themes/django/views/layout.rhtml:5:in `_run_rhtml_47vendor47plugins47auto45admin47themes47django47views47layout46rhtml'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb:317:in `compile_and_render_template'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb:293:in `render_template'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_view/base.rb:252:in `render_file'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/layout.rb:254:in `render_without_benchmark'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:50:in `render'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:50:in `render'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/base.rb:981:in `perform_action_without_filters'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:363:in `perform_action_without_benchmark'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/rescue.rb:80:in `perform_action'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/base.rb:408:in `process_without_filters'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/filters.rb:372:in `process_without_session_management_support'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/session_management.rb:114:in `process'
#{RAILS_ROOT}/vendor/rails/actionpack/lib/action_controller/base.rb:319:in `process'
#{RAILS_ROOT}/vendor/rails/railties/lib/dispatcher.rb:41:in `dispatch'
#{RAILS_ROOT}/vendor/rails/railties/lib/fcgi_handler.rb:150:in `process_request'
#{RAILS_ROOT}/vendor/rails/railties/lib/fcgi_handler.rb:54:in `process!'
/usr/lib/ruby/1.8/fcgi.rb:600:in `each_cgi'
/usr/lib/ruby/1.8/fcgi.rb:597:in `each_cgi'
#{RAILS_ROOT}/vendor/rails/railties/lib/fcgi_handler.rb:53:in `process!'
#{RAILS_ROOT}/vendor/rails/railties/lib/fcgi_handler.rb:23:in `process!'
/sites/stirr.net/public/dispatch.fcgi:24

Request

Parameters: None

Show session dump

--- 
:user_id: 1
flash: !map:ActionController::Flash::FlashHash {}


Response
Headers: {"Status"=>"200 OK", "cookie"=>[], "Cache-Control"=>"no-cache"}

Attachments

Change History

08/30/2006 01:14:17 AM changed by matthew

  • status changed from new to closed.
  • resolution set to invalid.

The problem is that you haven't called set_site_info from environment.rb. I've just committed a check so that you get a more useful error message (though I should probably just come up with a set of sensible defaults).

08/30/2006 11:06:27 PM changed by anonymous

  • status changed from closed to reopened.
  • resolution deleted.

The call to set_site_info is in there. What am I missing? (edge rails, ruby 1.8.4)

Also have the following plugins installed:

acts_as_versioned asynchronous comatose exception_notification file_column

AutoAdmin.config do |admin|
  # This information is used by the theme to construct a useful
  # header; the first parameter is the full URL of the main site, the
  # second is the displayed name of the site, and the third (optional)
  # parameter is the title for the administration site.
  admin.set_site_info 'http://test.vm/', 'test.vm'
  # "Primary Objects" are those for which lists should be directly
  # accessible from the home page.
  admin.primary_objects = %w(company)
  admin.theme = :django # Optional; this is the default.
end

08/31/2006 07:07:14 AM changed by matthew

Hrmm... could it be that AutoAdminHelper is being reloaded? I actually moved the site info storage into AutoAdmin::AutoAdminConfiguration in the last change; maybe that helps? In answer to your earlier question, site is a helper method on AutoAdminHelper. It used to retrieve the site info from an instance variable of the Module -- it now delegates to AutoAdmin::AutoAdminConfiguration.site, which retrieves it from a class variable.

09/25/2006 07:38:52 PM changed by matthew

  • status changed from reopened to closed.
  • resolution set to worksforme.

Edge (as of the earlier discussion on this ticket) is working for me, though I was seeing some routing test failures. Please re-open if you're still having problems.


Add/Change #11 (edge rails still broken?)




Change Properties
Action