2010-07-30 9 views
0

J'ai un crash sur mon système. journal de l'accident estcrash sur le site Web

:ActionView::MissingTemplate (Missing template public/422.html in view path app/views): 
    app/controllers/application_controller.rb:148:in `check_user' 
    fcgi (0.8.8) lib/fcgi.rb:117:in `session' 
    fcgi (0.8.8) lib/fcgi.rb:104:in `each_request' 
    fcgi (0.8.8) lib/fcgi.rb:36:in `each' 
    dispatch.fcgi:24 

Rendering /home5/cipherte/Portfolio/typetrigger/public/500.html (500 Internal Server Error) 
+0

Veuillez indiquer le code de la ligne 148 de 'application_controller.rb' ou la méthode' check_user' – Salil

Répondre

0

Créer un fichier appelé public/422.html dans votre projet avec le contenu suivant (de Rails) et regardez dans quelle mesure vous obtenez alors

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 

<head> 
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> 
    <title>The change you wanted was rejected (422)</title> 
    <style type="text/css"> 
     body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; } 
     div.dialog { 
      width: 25em; 
      padding: 0 4em; 
      margin: 4em auto 0 auto; 
      border: 1px solid #ccc; 
      border-right-color: #999; 
      border-bottom-color: #999; 
     } 
     h1 { font-size: 100%; color: #f00; line-height: 1.5em; } 
    </style> 
</head> 

<body> 
    <!-- This file lives in public/422.html --> 
    <div class="dialog"> 
    <h1>The change you wanted was rejected.</h1> 
    <p>Maybe you tried to change something you didn't have access to.</p> 
    </div> 
</body> 
</html> 
0

Essayez d'utiliser

render :file =>"#{RAILS_ROOT}/public/422.html" 

au lieu de

render :template =>"public/422.html"