Ticket #446 (closed defect: worksforme)

Opened 3 years ago

Last modified 1 year ago

ActionView::TemplateError (undefined method `+' for nil:NilClass)

Reported by: rbarazi@gmail.com Assigned to: tobi
Priority: normal Milestone:
Component: backend Version:
Severity: normal Keywords: ActionView TemplateError
Cc:

Description

Hi

I installed typo in a subdomain, and it's working fine with WEBrick and cgi, but once I change into FastCGI it's not working, I checked fastcgi crash log and it says nothin but:

I cheched the production log and here is the error it shows: Processing Base#index (for at Thu Sep 01 03:00:29 GST 2005)

Parameters: {"action"=>"index", "controller"=>"articles", "page"=>nil}

ActionView::TemplateError? (undefined method `+' for nil:NilClass) on line #7 of /../../$ 4: <title><%= page_title %></title> 5: <meta http-equiv="content-type" content="text/html; charset=utf-8" /> 6: <%= meta_tag 'ICBM', config_value(:geourl_location) %> 7: <link rel="EditURI" type="application/rsd+xml" title="RSD" href="<%= server_url_fo$ 8: <%= auto_discovery_link_tag :rss, :controller => 'xml', :action => 'rss' %> 9: <%= stylesheet_link_tag "/stylesheets/theme/azure" %> 10: <%= stylesheet_link_tag "/stylesheets/theme/local" %>

/gems/actionpack-1.9.1/lib/action_controller/request.rb:183:in `host_with_port' /gems/actionpack-1.9.1/lib/action_controller/url_rewriter.rb:24:in `rewrite_url' /gems/actionpack-1.9.1/lib/action_controller/url_rewriter.rb:11:in `rewrite' /gems/actionpack-1.9.1/lib/action_controller/base.rb:440:in `url_for' /gems/actionpack-1.9.1/lib/action_view/helpers/url_helper.rb:12:in `send' /gems/actionpack-1.9.1/lib/action_view/helpers/url_helper.rb:12:in `url_for' .config/..//app/helpers/application_helper.rb:47:in `server_url_for' (erb):7:in `evaluate_locals' /gems/actionpack-1.9.1/lib/action_view/base.rb:272:in `evaluate_locals' /gems/actionpack-1.9.1/lib/action_view/base.rb:283:in `rhtml_render' /gems/actionpack-1.9.1/lib/action_view/base.rb:208:in `send' /gems/actionpack-1.9.1/lib/action_view/base.rb:208:in `render_template' /gems/actionpack-1.9.1/lib/action_view/base.rb:173:in `render_file' /gems/actionpack-1.9.1/lib/action_controller/layout.rb:214:in `render_without_bench$ /gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:25:in `render' /gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:25:in `measure' /gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:25:in `render' .config/../app/controllers/articles_controller.rb:59:in `error' .config/../app/controllers/articles_controller.rb:175:in `rescue_action_in_public' /gems/actionpack-1.9.1/lib/action_controller/rescue.rb:33:in `rescue_action' /gems/actionpack-1.9.1/lib/action_controller/rescue.rb:106:in `perform_action' /gems/actionpack-1.9.1/lib/action_controller/base.rb:356:in `send' /gems/actionpack-1.9.1/lib/action_controller/base.rb:356:in `process' /gems/rails-0.13.1/lib/dispatcher.rb:32:in `dispatch' /gems/rails-0.13.1/lib/fcgi_handler.rb:144:in `process_request' /gems/rails-0.13.1/lib/fcgi_handler.rb:64:in `process!' /gems/rails-0.13.1/lib/fcgi_handler.rb:55:in `each_cgi' /gems/rails-0.13.1/lib/fcgi_handler.rb:55:in `process!' /gems/rails-0.13.1/lib/fcgi_handler.rb:21:in `process!' public/dispatch.fcgi:26

Any Ideas?

Change History

09/01/05 09:19:07 changed by scoop

  • priority changed from high to normal.
  • severity changed from blocker to normal.

Please tell us a little more about your setup. As 99% of all typo installations run on FastCGI, I can hardly imagine this to be a generic problem.

  • Which version of typo are you running? If you're running from SVN, tell us the revision.
  • Which version of Rails do you have installed?
  • Which webserver and version are you using? Please also quote your FastCGI configuration for the virtual host.
  • Which operating system are you on?

09/01/05 09:59:24 changed by rbarazi@gmail.com

Hi Thanks for the reply, kindly find below the information you requested;

On 9/1/05, typo <trac@leetsoft.com> wrote:

#373: ActionView::TemplateError? (undefined method `+' for nil:NilClass) ---------------------+------------------------------------------------------

Id: 373 | Status: new

Component: backend | Modified: Thu Sep 1 03:19:07 2005 Severity: normal | Milestone: Priority: normal | Version:

Owner: tobi | Reporter: rbarazi@gmail.com

---------------------+------------------------------------------------------ Changes (by scoop):

  • severity: blocker => normal
  • priority: high => normal

Comment:

Please tell us a little more about your setup. As 99% of all typo installations run on FastCGI, I can hardly imagine this to be a generic problem.

  • Which version of typo are you running? If you're running from SVN, tell

us the revision.

2005-08-14 Typo 2.5.5 Stable Release

  • Which version of Rails do you have installed?

rails-0.13.1

  • Which webserver and version are you using? Please also quote your

FastCGI configuration for the virtual host.

Apahe 2.0.40-21.18.legacy

<VirtualHost? 207.58.180.111:80>

ServerName? blog.amidship.com:80 ServerAdmin? "rbarazi@gmail.com" DocumentRoot? /home/httpd/vhosts/amidship.com/ruby/typo/public CustomLog? /home/httpd/vhosts/amidship.com/statistics/logs/access_log plesklog ErrorLog? /home/httpd/vhosts/amidship.com/statistics/logs/error_log Options Indexes ExecCGI FollowSymLinks? RewriteEngine? On LogLevel? debug <IfModule? mod_ssl.c>

SSLEngine off

</IfModule> <Directory /home/httpd/vhosts/amidship.com/ruby/typo/public> <IfModule? sapi_apache2.c>

AddType? text/plain .php .php4 .php3 .phtml php_admin_flag engine off

</IfModule>

Options -Includes -ExecCGI

</Directory> Alias "/error_docs" "/home/httpd/vhosts/amidship.com/error_docs" ErrorDocument? 400 /error_docs/bad_request.html ErrorDocument? 401 /error_docs/unauthorized.html ErrorDocument? 403 /error_docs/forbidden.html ErrorDocument? 404 /error_docs/not_found.html ErrorDocument? 500 /error_docs/internal_server_error.html

</VirtualHost>

  • Which operating system are you on?

Redhat Linux 9 with custom Kernel, Plesk 7.5 Reloaded control panel (7.5.3-rh9.build75050506.13) --

Ticket URL: <http://typo.leetsoft.com/trac/ticket/373 > typo <http://typo.leetsoft.com/> web2.0 weblogging engine

I don't know what I messed up but now I'm failing into another error, the CGI not working also showing the same error in production.log and this error in the error log: [Thu Sep 01 11:19:41 2005] [error] [client 195.229.241.183] Premature end of script headers: dispatch.cgi [Thu Sep 01 11:19:41 2005] [error] [client 195.229.241.183] /usr/bin/env: ruby: No such file or directory

in Plesk usually virtual hosts will be defined in a separate configuration file which is included the global httpd.conf file... the above quote is for this included file, and inside the global httpd.conf I added the following:

LoadModule? fastcgi_module modules/mod_fastcgi.so AddHandler? fastcgi-script .fcgi <IfModule? mod_fastcgi.c>

FastCgiIpcDir? /tmp/fcgi_ipc/

AddHandler? fastcgi-script .fcgi

</IfModule>

Thanks for your help.. Rida Al Barazi

09/11/05 14:39:26 changed by scoop

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

Okay, this is definitely a problem with your install. For one, I don't see anything FastCGI related in your config (although it's a little hard to read with all that formatting thrown in). As it stands right now, typo might be executing on CGI, although the default .htaccess instructs it to use FastCGI.

The problem with ruby not being found is another problem. You might want to change /usr/bin/env ruby in public/dispatch.* to  /usr/bin/ruby or  /usr/local/bin/ruby or wherever your ruby binary resides.

All in all, it might make sense for you to either join the IRC channel at irc://irc.freenode.net/#typo or email the typo mailing list?.

I'm closing this ticket, as it's not a code error.