Noch eine Frage zu Ruby

Dieses Thema im Forum "Installation und Konfiguration" wurde erstellt von AndréS, 2. März 2009.

  1. AndréS

    AndréS New Member

    Hallo nochmal,

    ich habe nochmal ne Frage zu Ruby. Und zwar geht es darum, dass ich Ruby installiert habe. In meinem Buch stehen alle Files aber mit .rhtml
    Ich dachte mir ich mache das per Apache Direktive:
    Code:
    <IfModule mod_ruby.c>
      <Directory /var/www/web32/web>
        Options +ExecCGI
      </Directory>
      RubyRequire apache/ruby-run
      #RubySafeLevel 0
      <Files *.rb>
        SetHandler ruby-object
        RubyHandler Apache::RubyRun.instance
      </Files>
      <Files *.rbx>
        SetHandler ruby-object
        RubyHandler Apache::RubyRun.instance
      </Files>
      <Files *.rhtml>
        SetHandler ruby-object
        RubyHandler Apache::RubyRun.instance
      </Files>
    </IfModule>
    Nun Ja, das hat leider auch nichts bewirkt, einfach nur den Fehler 500.

    Ich muss dazu sagen, auf der einen Seite wo ich das teste, bekomme ich eine Art installationsroutine, in der ich dann die database.yml anpassen soll.
    Bei dem neu eingerichteten Konto jedoch bekomme ich gar nichts. Und damit meine ich, dass ich meine index.html sehen kann ich kann auch ein Testscript mit Endung .rb ausführen lassen, mehr aber auch nicht. Kein rhtml auch wenn ich die Rechte auf 755 stelle, was ja da sein muss.

    Wo liegt der Fehler???

    Vielen Dank

    AndréS
     
  2. Till

    Till Administrator

    Wenn Du einen 500er Fehler bekommst, dann findet sich die Ursache dazu im error.log vermerkt. Schau also mal ins globale error.log und ins error.log der Webseite.
     
  3. AndréS

    AndréS New Member

    Hi Till,

    Danke ich habe gleich mal in dem Webseiten log nachgesehen, folgendes kam zu Tage
    Code:
    [Mon Mar 02 22:08:24 2009] [error] access to /var/www/web45/web/test.rhtml failed for (null), reason: file permissions deny server execution
    [Mon Mar 02 22:08:25 2009] [error] access to /var/www/web45/web/test.rhtml failed for (null), reason: file permissions deny server execution
    [Mon Mar 02 22:08:25 2009] [error] [client *] File does not exist: /var/www/web45/web/favicon.ico, referer: http://webby24.de/test.rhtml
    [Mon Mar 02 22:08:34 2009] [error] mod_ruby: error in ruby
    [Mon Mar 02 22:08:34 2009] [error] mod_ruby: /usr/lib/ruby/1.8/apache/ruby-run.rb:53:in `load': /var/www/web45/web/test.rhtml:1: syntax error, unexpected '<' (SyntaxError)
    [Mon Mar 02 22:08:34 2009] [error] mod_ruby: <html>
    [Mon Mar 02 22:08:34 2009] [error] mod_ruby:  ^
    [Mon Mar 02 22:08:34 2009] [error] mod_ruby: /var/www/web45/web/test.rhtml:3: unknown regexp option - p
    [Mon Mar 02 22:08:34 2009] [error] mod_ruby: /var/www/web45/web/test.rhtml:4: syntax error, unexpected '<'
    [Mon Mar 02 22:08:34 2009] [error] mod_ruby: </html>
    [Mon Mar 02 22:08:34 2009] [error] mod_ruby:  ^
    [Mon Mar 02 22:08:34 2009] [error] mod_ruby: /var/www/web45/web/test.rhtml:4: unterminated string meets end of file
    [Mon Mar 02 22:08:34 2009] [error] mod_ruby:   from /usr/lib/ruby/1.8/apache/ruby-run.rb:53:in `handler'
    [Mon Mar 02 22:08:34 2009] [error] [client *] File does not exist: /var/www/web45/web/favicon.ico, referer: http://webby24.de/test.rhtml
    [Mon Mar 02 22:08:35 2009] [error] mod_ruby: error in ruby
    [Mon Mar 02 22:08:35 2009] [error] mod_ruby: /usr/lib/ruby/1.8/apache/ruby-run.rb:53:in `load': /var/www/web45/web/test.rhtml:1: syntax error, unexpected '<' (SyntaxError)
    [Mon Mar 02 22:08:35 2009] [error] mod_ruby: <html>
    [Mon Mar 02 22:08:35 2009] [error] mod_ruby:  ^
    [Mon Mar 02 22:08:35 2009] [error] mod_ruby: /var/www/web45/web/test.rhtml:3: unknown regexp option - p
    [Mon Mar 02 22:08:35 2009] [error] mod_ruby: /var/www/web45/web/test.rhtml:4: syntax error, unexpected '<'
    [Mon Mar 02 22:08:35 2009] [error] mod_ruby: </html>
    [Mon Mar 02 22:08:35 2009] [error] mod_ruby:  ^
    [Mon Mar 02 22:08:35 2009] [error] mod_ruby: /var/www/web45/web/test.rhtml:4: unterminated string meets end of file
    [Mon Mar 02 22:08:35 2009] [error] mod_ruby:   from /usr/lib/ruby/1.8/apache/ruby-run.rb:53:in `handler'
    [Mon Mar 02 22:08:35 2009] [error] [client *] File does not exist: /var/www/web45/web/favicon.ico, referer: http://webby24.de/test.rhtml
    [Mon Mar 02 22:08:36 2009] [error] mod_ruby: error in ruby
    [Mon Mar 02 22:08:36 2009] [error] mod_ruby: /usr/lib/ruby/1.8/apache/ruby-run.rb:53:in `load': /var/www/web45/web/test.rhtml:1: syntax error, unexpected '<' (SyntaxError)
    [Mon Mar 02 22:08:36 2009] [error] mod_ruby: <html>
    [Mon Mar 02 22:08:36 2009] [error] mod_ruby:  ^
    [Mon Mar 02 22:08:36 2009] [error] mod_ruby: /var/www/web45/web/test.rhtml:3: unknown regexp option - p
    [Mon Mar 02 22:08:36 2009] [error] mod_ruby: /var/www/web45/web/test.rhtml:4: syntax error, unexpected '<'
    [Mon Mar 02 22:08:36 2009] [error] mod_ruby: </html>
    [Mon Mar 02 22:08:36 2009] [error] mod_ruby:  ^
    [Mon Mar 02 22:08:36 2009] [error] mod_ruby: /var/www/web45/web/test.rhtml:4: unterminated string meets end of file
    [Mon Mar 02 22:08:36 2009] [error] mod_ruby:   from /usr/lib/ruby/1.8/apache/ruby-run.rb:53:in `handler'
    [Mon Mar 02 22:08:36 2009] [error] [client *] File does not exist: /var/www/web45/web/favicon.ico, referer: http://webby24.de/test.rhtml
    [Mon Mar 02 22:08:36 2009] [error] mod_ruby: error in ruby
    [Mon Mar 02 22:08:36 2009] [error] mod_ruby: /usr/lib/ruby/1.8/apache/ruby-run.rb:53:in `load': /var/www/web45/web/test.rhtml:1: syntax error, unexpected '<' (SyntaxError)
    [Mon Mar 02 22:08:36 2009] [error] mod_ruby: <html>
    [Mon Mar 02 22:08:36 2009] [error] mod_ruby:  ^
    [Mon Mar 02 22:08:36 2009] [error] mod_ruby: /var/www/web45/web/test.rhtml:3: unknown regexp option - p
    [Mon Mar 02 22:08:36 2009] [error] mod_ruby: /var/www/web45/web/test.rhtml:4: syntax error, unexpected '<'
    [Mon Mar 02 22:08:36 2009] [error] mod_ruby: </html>
    [Mon Mar 02 22:08:36 2009] [error] mod_ruby:  ^
    [Mon Mar 02 22:08:36 2009] [error] mod_ruby: /var/www/web45/web/test.rhtml:4: unterminated string meets end of file
    [Mon Mar 02 22:08:36 2009] [error] mod_ruby:   from /usr/lib/ruby/1.8/apache/ruby-run.rb:53:in `handler'
    [Mon Mar 02 22:08:36 2009] [error] [client *] File does not exist: /var/www/web45/web/favicon.ico, referer: http://webby24.de/test.rhtml
    [Mon Mar 02 22:09:18 2009] [error] mod_ruby: error in ruby
    [Mon Mar 02 22:09:18 2009] [error] mod_ruby: /usr/lib/ruby/1.8/apache/ruby-run.rb:53:in `load': /var/www/web45/web/test.rhtml:1: syntax error, unexpected '<' (SyntaxError)
    [Mon Mar 02 22:09:18 2009] [error] mod_ruby: <html>
    [Mon Mar 02 22:09:18 2009] [error] mod_ruby:  ^
    [Mon Mar 02 22:09:18 2009] [error] mod_ruby: /var/www/web45/web/test.rhtml:3: unknown regexp option - p
    [Mon Mar 02 22:09:18 2009] [error] mod_ruby: /var/www/web45/web/test.rhtml:4: syntax error, unexpected '<'
    [Mon Mar 02 22:09:18 2009] [error] mod_ruby: </html>
    [Mon Mar 02 22:09:18 2009] [error] mod_ruby:  ^
    [Mon Mar 02 22:09:18 2009] [error] mod_ruby: /var/www/web45/web/test.rhtml:4: unterminated string meets end of file
    [Mon Mar 02 22:09:18 2009] [error] mod_ruby:   from /usr/lib/ruby/1.8/apache/ruby-run.rb:53:in `handler'
    [Mon Mar 02 22:11:14 2009] [error] [client *] File does not exist: /var/www/web45/web/favicon.ico, referer: http://webby24.de/
    [Mon Mar 02 22:11:22 2009] [error] mod_ruby: error in ruby
    [Mon Mar 02 22:11:22 2009] [error] mod_ruby: /usr/lib/ruby/1.8/apache/ruby-run.rb:53:in `load': /var/www/web45/web/test.rhtml:1: syntax error, unexpected '<' (SyntaxError)
    [Mon Mar 02 22:11:22 2009] [error] mod_ruby: <html>
    [Mon Mar 02 22:11:22 2009] [error] mod_ruby:  ^
    [Mon Mar 02 22:11:22 2009] [error] mod_ruby: /var/www/web45/web/test.rhtml:3: unknown regexp option - p
    [Mon Mar 02 22:11:22 2009] [error] mod_ruby: /var/www/web45/web/test.rhtml:4: syntax error, unexpected '<'
    [Mon Mar 02 22:11:22 2009] [error] mod_ruby: </html>
    [Mon Mar 02 22:11:22 2009] [error] mod_ruby:  ^
    [Mon Mar 02 22:11:22 2009] [error] mod_ruby: /var/www/web45/web/test.rhtml:4: unterminated string meets end of file
    [Mon Mar 02 22:11:22 2009] [error] mod_ruby:   from /usr/lib/ruby/1.8/apache/ruby-run.rb:53:in `handler'
    [Mon Mar 02 22:11:23 2009] [error] mod_ruby: error in ruby
    [Mon Mar 02 22:11:23 2009] [error] mod_ruby: /usr/lib/ruby/1.8/apache/ruby-run.rb:53:in `load': /var/www/web45/web/test.rhtml:1: syntax error, unexpected '<' (SyntaxError)
    [Mon Mar 02 22:11:23 2009] [error] mod_ruby: <html>
    [Mon Mar 02 22:11:23 2009] [error] mod_ruby:  ^
    [Mon Mar 02 22:11:23 2009] [error] mod_ruby: /var/www/web45/web/test.rhtml:3: unknown regexp option - p
    [Mon Mar 02 22:11:23 2009] [error] mod_ruby: /var/www/web45/web/test.rhtml:4: syntax error, unexpected '<'
    [Mon Mar 02 22:11:23 2009] [error] mod_ruby: </html>
    [Mon Mar 02 22:11:23 2009] [error] mod_ruby:  ^
    [Mon Mar 02 22:11:23 2009] [error] mod_ruby: /var/www/web45/web/test.rhtml:4: unterminated string meets end of file
    [Mon Mar 02 22:11:23 2009] [error] mod_ruby:   from /usr/lib/ruby/1.8/apache/ruby-run.rb:53:in `handler'
    [Mon Mar 02 22:11:23 2009] [error] [client *] File does not exist: /var/www/web45/web/favicon.ico, referer: http://webby24.de/test.rhtml
    [Mon Mar 02 22:11:24 2009] [error] mod_ruby: error in ruby
    [Mon Mar 02 22:11:24 2009] [error] mod_ruby: /usr/lib/ruby/1.8/apache/ruby-run.rb:53:in `load': /var/www/web45/web/test.rhtml:1: syntax error, unexpected '<' (SyntaxError)
    [Mon Mar 02 22:11:24 2009] [error] mod_ruby: <html>
    [Mon Mar 02 22:11:24 2009] [error] mod_ruby:  ^
    [Mon Mar 02 22:11:24 2009] [error] mod_ruby: /var/www/web45/web/test.rhtml:3: unknown regexp option - p
    [Mon Mar 02 22:11:24 2009] [error] mod_ruby: /var/www/web45/web/test.rhtml:4: syntax error, unexpected '<'
    [Mon Mar 02 22:11:24 2009] [error] mod_ruby: </html>
    [Mon Mar 02 22:11:24 2009] [error] mod_ruby:  ^
    [Mon Mar 02 22:11:24 2009] [error] mod_ruby: /var/www/web45/web/test.rhtml:4: unterminated string meets end of file
    [Mon Mar 02 22:11:24 2009] [error] mod_ruby:   from /usr/lib/ruby/1.8/apache/ruby-run.rb:53:in `handler'
    Das ist das, bei dem ich keine Anzeige habe mit database.yml
    Klassen können verarbeitet werden, bzw. datein mit .rb
     
  4. AndréS

    AndréS New Member

    Hier nun das andere, auch wieder ausgewählt. Das ganze Log kann ich dir gerne per PN schicken.
    Code:
    [Tue Mar 03 23:07:04 2009] [error] [client *] Rails Error: Unable to access log file. Please ensure that /var/www/web42/web/../config/../log/production.log exists and is chmod 0666. The log level has been raised to WARN and the output directed to STDERR until the problem is fixed.
    [Tue Mar 03 23:07:04 2009] [error] [client *] 
    [Tue Mar 03 23:07:04 2009] [error] [client *] 
    [Tue Mar 03 23:07:04 2009] [error] [client *] ActionController::RoutingError (Recognition failed for "/test.rb"):
    [Tue Mar 03 23:07:04 2009] [error] [client *]     /vendor/rails/actionpack/lib/action_controller/routing.rb:522:in `recognition_failed'
    [Tue Mar 03 23:07:04 2009] [error] [client *]     /vendor/rails/actionpack/lib/action_controller/routing.rb:512:in `recognize!'
    [Tue Mar 03 23:07:04 2009] [error] [client *]     /vendor/rails/railties/lib/dispatcher.rb:38:in `dispatch'
    [Tue Mar 03 23:07:04 2009] [error] [client *]     /var/www/web42/web/dispatch.cgi:12
    [Tue Mar 03 23:07:04 2009] [error] [client *] 
    [Tue Mar 03 23:07:04 2009] [error] [client *] 
    [Tue Mar 03 23:07:04 2009] [error] [client *] Recognition failed for "/test.rb"\r
    [Tue Mar 03 23:07:04 2009] [error] [client *] /var/www/web42/web/../config/../vendor/rails/actionpack/lib/action_controller/routing.rb:522:in `recognition_failed'\r
    [Tue Mar 03 23:07:04 2009] [error] [client *] /var/www/web42/web/../config/../vendor/rails/actionpack/lib/action_controller/routing.rb:512:in `recognize!'\r
    [Tue Mar 03 23:07:04 2009] [error] [client *] /var/www/web42/web/../config/../vendor/rails/railties/lib/dispatcher.rb:38:in `dispatch'\r
    [Tue Mar 03 23:07:04 2009] [error] [client *] /var/www/web42/web/dispatch.cgi:12
    [Tue Mar 03 23:09:21 2009] [error] [client *] Rails Error: Unable to access log file. Please ensure that /var/www/web42/web/../config/../log/production.log exists and is chmod 0666. The log level has been raised to WARN and the output directed to STDERR until the problem is fixed., referer: http://deinnachhilfevz.de/
    [Tue Mar 03 23:09:21 2009] [error] [client *] , referer: http://deinnachhilfevz.de/
    [Tue Mar 03 23:09:21 2009] [error] [client *] , referer: http://deinnachhilfevz.de/
    [Tue Mar 03 23:09:21 2009] [error] [client *] ActionController::RoutingError (Recognition failed for "/rails/info/properties"):, referer: http://deinnachhilfevz.de/
    [Tue Mar 03 23:09:21 2009] [error] [client *]     /vendor/rails/actionpack/lib/action_controller/routing.rb:522:in `recognition_failed', referer: http://deinnachhilfevz.de/
    [Tue Mar 03 23:09:21 2009] [error] [client *]     /vendor/rails/actionpack/lib/action_controller/routing.rb:512:in `recognize!', referer: http://deinnachhilfevz.de/
    [Tue Mar 03 23:09:21 2009] [error] [client *]     /vendor/rails/railties/lib/dispatcher.rb:38:in `dispatch', referer: http://deinnachhilfevz.de/
    [Tue Mar 03 23:09:21 2009] [error] [client *]     /var/www/web42/web/dispatch.cgi:12, referer: http://deinnachhilfevz.de/
    [Tue Mar 03 23:09:21 2009] [error] [client *] , referer: http://deinnachhilfevz.de/
    [Tue Mar 03 23:09:21 2009] [error] [client *] , referer: http://deinnachhilfevz.de/
    [Tue Mar 03 23:09:21 2009] [error] [client *] Recognition failed for "/rails/info/properties"\r, referer: http://deinnachhilfevz.de/
    [Tue Mar 03 23:09:21 2009] [error] [client *] /var/www/web42/web/../config/../vendor/rails/actionpack/lib/action_controller/routing.rb:522:in `recognition_failed'\r, referer: http://deinnachhilfevz.de/
    [Tue Mar 03 23:09:21 2009] [error] [client *] /var/www/web42/web/../config/../vendor/rails/actionpack/lib/action_controller/routing.rb:512:in `recognize!'\r, referer: http://deinnachhilfevz.de/
    [Tue Mar 03 23:09:21 2009] [error] [client *] /var/www/web42/web/../config/../vendor/rails/railties/lib/dispatcher.rb:38:in `dispatch'\r, referer: http://deinnachhilfevz.de/
    [Tue Mar 03 23:09:21 2009] [error] [client *] /var/www/web42/web/dispatch.cgi:12, referer: http://deinnachhilfevz.de/
    [Tue Mar 03 23:09:28 2009] [error] [client *] Rails Error: Unable to access log file. Please ensure that /var/www/web42/web/../config/../log/production.log exists and is chmod 0666. The log level has been raised to WARN and the output directed to STDERR until the problem is fixed.
    [Tue Mar 03 23:09:28 2009] [error] [client *] 
    [Tue Mar 03 23:09:28 2009] [error] [client *] 
    [Tue Mar 03 23:09:28 2009] [error] [client *] ActionController::RoutingError (Recognition failed for "/test.rhtml"):
    [Tue Mar 03 23:09:28 2009] [error] [client *]     /vendor/rails/actionpack/lib/action_controller/routing.rb:522:in `recognition_failed'
    [Tue Mar 03 23:09:28 2009] [error] [client *]     /vendor/rails/actionpack/lib/action_controller/routing.rb:512:in `recognize!'
    [Tue Mar 03 23:09:28 2009] [error] [client *]     /vendor/rails/railties/lib/dispatcher.rb:38:in `dispatch'
    [Tue Mar 03 23:09:28 2009] [error] [client *]     /var/www/web42/web/dispatch.cgi:12
    [Tue Mar 03 23:09:28 2009] [error] [client *] 
    [Tue Mar 03 23:09:28 2009] [error] [client *] 
    [Tue Mar 03 23:09:28 2009] [error] [client *] Recognition failed for "/test.rhtml"\r
    [Tue Mar 03 23:09:28 2009] [error] [client *] /var/www/web42/web/../config/../vendor/rails/actionpack/lib/action_controller/routing.rb:522:in `recognition_failed'\r
    [Tue Mar 03 23:09:28 2009] [error] [client *] /var/www/web42/web/../config/../vendor/rails/actionpack/lib/action_controller/routing.rb:512:in `recognize!'\r
    [Tue Mar 03 23:09:28 2009] [error] [client *] /var/www/web42/web/../config/../vendor/rails/railties/lib/dispatcher.rb:38:in `dispatch'\r
    [Tue Mar 03 23:09:28 2009] [error] [client *] /var/www/web42/web/dispatch.cgi:12
    [Tue Mar 03 23:13:48 2009] [error] [client *] Rails Error: Unable to access log file. Please ensure that /var/www/web42/web/../config/../log/production.log exists and is chmod 0666. The log level has been raised to WARN and the output directed to STDERR until the problem is fixed.
    [Tue Mar 03 23:13:48 2009] [error] [client *] 
    [Tue Mar 03 23:13:48 2009] [error] [client *] 
    [Tue Mar 03 23:13:48 2009] [error] [client *] ActionController::RoutingError (Recognition failed for "/test.rb"):
    [Tue Mar 03 23:13:48 2009] [error] [client *]     /vendor/rails/actionpack/lib/action_controller/routing.rb:522:in `recognition_failed'
    [Tue Mar 03 23:13:48 2009] [error] [client *]     /vendor/rails/actionpack/lib/action_controller/routing.rb:512:in `recognize!'
    [Tue Mar 03 23:13:48 2009] [error] [client *]     /vendor/rails/railties/lib/dispatcher.rb:38:in `dispatch'
    [Tue Mar 03 23:13:48 2009] [error] [client *]     /var/www/web42/web/dispatch.cgi:12
    [Tue Mar 03 23:13:48 2009] [error] [client *] 
    [Tue Mar 03 23:13:48 2009] [error] [client *] 
    [Tue Mar 03 23:13:48 2009] [error] [client *] Recognition failed for "/test.rb"\r
    [Tue Mar 03 23:13:48 2009] [error] [client *] /var/www/web42/web/../config/../vendor/rails/actionpack/lib/action_controller/routing.rb:522:in `recognition_failed'\r
    [Tue Mar 03 23:13:48 2009] [error] [client *] /var/www/web42/web/../config/../vendor/rails/actionpack/lib/action_controller/routing.rb:512:in `recognize!'\r
    [Tue Mar 03 23:13:48 2009] [error] [client *] /var/www/web42/web/../config/../vendor/rails/railties/lib/dispatcher.rb:38:in `dispatch'\r
    [Tue Mar 03 23:13:48 2009] [error] [client *] /var/www/web42/web/dispatch.cgi:12
    Was kann ich machen????

    AndréS
     
  5. Till

    Till Administrator

    Dem Fehler nach ist Dein Logfile nicht für den webserver beschreibbar. Stell mal das zugehörige Verzeichnis und logfile auf 777.
     

Diese Seite empfehlen