Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

first commit

  • Loading branch information...
commit e34d26c963ddad3ecd8060136bde4a348797b995 0 parents
@gkellogg authored
19 Gemfile
@@ -0,0 +1,19 @@
+source 'http://rubygems.org'
+
+# Include non-released gems first
+gem 'rdf', :git => "https://github.com/gkellogg/rdf.git", :branch => "query-algebra"
+gem 'rdf-n3', :git => "https://github.com/gkellogg/rdf-n3.git", :require => "rdf/n3"
+#gem 'rdf-rdfa', :git => "https://github.com/gkellogg/rdf-rdfa.git", :require => "rdf/rdfa"
+gem 'rdf-rdfa', :path => "../rdf-rdfa"
+gem 'rdf-rdfxml', :git => "https://github.com/gkellogg/rdf-rdfxml.git", :require => "rdf/rdfxml"
+
+gem 'sinatra', '>= 1.2.1'
+gem 'sinatra-linkeddata', '>= 0.3.0', :require => 'sinatra/linkeddata'
+gem 'erubis', '>= 2.6.6'
+
+# Bundle gems for the local environment. Make sure to
+# put test-only gems in this group so their generators
+# and rake tasks are available in development mode:
+group :development, :test do
+ gem 'shotgun'
+end
81 Gemfile.lock
@@ -0,0 +1,81 @@
+GIT
+ remote: https://github.com/gkellogg/rdf-n3.git
+ revision: 98085da296dc1d570b96c0fd93589b51c549d024
+ specs:
+ rdf-n3 (0.3.1.1)
+ rdf (>= 0.3.1)
+
+GIT
+ remote: https://github.com/gkellogg/rdf-rdfxml.git
+ revision: 3fa8e071295d587f3045810b1d85f245f8696879
+ specs:
+ rdf-rdfxml (0.3.2.1)
+ nokogiri (>= 1.4.4)
+ rdf (>= 0.3.1)
+
+GIT
+ remote: https://github.com/gkellogg/rdf.git
+ revision: 5b29e815e8e521b357a11087df3d70b502596e20
+ branch: query-algebra
+ specs:
+ rdf (0.3.1)
+ addressable (>= 2.2.4)
+
+PATH
+ remote: ../rdf-rdfa
+ specs:
+ rdf-rdfa (0.3.1.2)
+ nokogiri (>= 1.3.3)
+ rdf
+ rdf (>= 0.3.1)
+
+GEM
+ remote: http://rubygems.org/
+ specs:
+ abstract (1.0.0)
+ addressable (2.2.4)
+ erubis (2.6.6)
+ abstract (>= 1.0.0)
+ json_pure (1.5.1)
+ linkeddata (0.3.1)
+ rdf (~> 0.3.1)
+ rdf-isomorphic (~> 0.3.1)
+ rdf-json (~> 0.3.0)
+ rdf-n3 (~> 0.3.0)
+ rdf-rdfa (~> 0.3.0)
+ rdf-rdfxml (~> 0.3.0)
+ rdf-trix (~> 0.3.0)
+ nokogiri (1.4.4)
+ rack (1.2.2)
+ rack-linkeddata (0.3.0)
+ linkeddata (~> 0.3.0)
+ rack (>= 1.0)
+ rdf-isomorphic (0.3.4)
+ rdf (>= 0.2.3)
+ rdf-json (0.3.0)
+ json_pure (>= 1.4.2)
+ rdf (~> 0.3.0)
+ rdf-trix (0.3.0)
+ rdf (~> 0.3.0)
+ shotgun (0.9)
+ rack (>= 1.0)
+ sinatra (1.2.1)
+ rack (~> 1.1)
+ tilt (< 2.0, >= 1.2.2)
+ sinatra-linkeddata (0.3.0)
+ rack-linkeddata (~> 0.3.0)
+ sinatra (>= 1.0)
+ tilt (1.2.2)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ erubis (>= 2.6.6)
+ rdf!
+ rdf-n3!
+ rdf-rdfa!
+ rdf-rdfxml!
+ shotgun
+ sinatra (>= 1.2.1)
+ sinatra-linkeddata (>= 0.3.0)
1  README
0  README.md
No changes.
24 UNLICENSE
@@ -0,0 +1,24 @@
+This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or
+distribute this software, either in source code form or as a compiled
+binary, for any purpose, commercial or non-commercial, and by any
+means.
+
+In jurisdictions that recognize copyright laws, the author or authors
+of this software dedicate any and all copyright interest in the
+software to the public domain. We make this dedication for the benefit
+of the public at large and to the detriment of our heirs and
+successors. We intend this dedication to be an overt act of
+relinquishment in perpetuity of all present and future rights to this
+software under copyright law.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+For more information, please refer to <http://unlicense.org/>
1  VERSION
@@ -0,0 +1 @@
+0.0.1
17 config.ru
@@ -0,0 +1,17 @@
+#!/usr/bin/env rackup
+$:.unshift(File.expand_path('../lib', __FILE__))
+
+#log = File.new('sinatra.log', 'a')
+#STDOUT.reopen(log)
+#STDERR.reopen(log)
+
+require 'rubygems' || Gem.clear_paths
+require 'bundler'
+Bundler.setup
+
+require 'rdf/portal'
+
+set :environment, :production
+disable :run, :reload
+
+run RDF::Portal::Application
162 lib/rdf/portal.rb
@@ -0,0 +1,162 @@
+require 'sinatra'
+require 'sinatra/linkeddata' # Can't use this, as we may need to set by hand, and have to pass options to the serializer
+require 'sinatra/partials'
+require 'erubis'
+
+module RDF
+ module Portal
+ class Application < Sinatra::Base
+ #register Sinatra::LinkedData
+ helpers Sinatra::Partials
+ #use Rack::LinkedData::ContentNegotiation, :default => "text/html"
+ set :views, ::File.expand_path('../portal/views', __FILE__)
+
+ before do
+ puts "[#{request.path_info}], #{params.inspect}"
+ end
+
+ get '/' do
+ cache_control :public, :must_revalidate, :max_age => 60
+ erubis :index, :locals => {:title => "Ruby Linked Data Service"}
+ end
+
+ get '/about' do
+ cache_control :public, :must_revalidate, :max_age => 60
+ erubis :about, :locals => {:title => "About the Ruby Linked Data Service"}
+ end
+
+ get '/distiller' do
+ distil
+ end
+
+ post '/distiller' do
+ distil
+ end
+
+ private
+
+ # Handle GET/POST /distiller
+ def distil
+ content_type, content = parse
+ puts "content_type: #{content_type}"
+ if !params["raw"].to_s.empty? || content_type !~ /html/
+ status 200
+ headers "Allow" => "GET, POST", "Content-Type" => content_type
+ body content
+ else
+ @output = content
+ erubis :distiller, :locals => {:title => "RDF Distiller", :head => :distiller}
+ end
+ end
+
+ # Return ordered accept mime-types
+ def accepts
+ types = []
+ request.env["HTTP_ACCEPT"].to_s.split(",").each do |type|
+ t, q = type.split(';q=')
+ q ||= t =~ /xml$/ ? "0.9" : "1" # WebKit places application/xml at same priority as /html
+ types << [t, q.to_i]
+ end
+
+ types.sort {|a, b| b[1] <=> a[1]}.map {|(t, q)| t}
+ end
+
+ # Parse HTTP Accept header and find an suitable RDF writer
+ def writer(format = nil)
+ return format.to_sym if format && format.to_sym != :accept
+
+ # Look for formats matching accept headers
+ accepts.each do |t|
+ writer = RDF::Writer.for(:content_type => t)
+ return writer.to_sym if writer
+ end
+
+ return :ntriples
+ end
+
+ # Format symbol for RDF formats
+ # @param [Symbol] reader_or_writer
+ # @return [Array<Symbol>] List of format symbols
+ def formats(reader_or_writer = nil)
+ # Symbols for different input formats
+ RDF::Format.select do |f|
+ reader_or_writer != :reader || f.reader
+ reader_or_writer != :writer || f.writer
+ end.map(&:to_sym).sort
+ end
+
+ # Parse the an input file and re-serialize based on params and/or content-type/accept headers
+ def parse
+ reader_opts = {
+ :prefixes => {},
+ :base_uri => params["uri"],
+ :validate => params["validate"]
+ }
+ reader_opts[:format] = params["in_fmt"].to_sym unless params["in_fmt"].nil? || params["in_fmt"] == 'content'
+ reader_opts[:debug] = @debug = [] if params["debug"]
+ case
+ when !params["datafile"].to_s.empty?
+ raise "Specify input format" if params["in_fmt"].nil? || params["in_fmt"] == 'content'
+ reader = RDF::Reader.for(params["in_fmt"]).new(content, reader_opts)
+ when !params["content"].to_s.empty?
+ raise "Specify input format" if params["in_fmt"].nil? || params["in_fmt"] == 'content'
+ reader = RDF::Reader.for(params["in_fmt"]).new(content, reader_opts)
+ when !params["uri"].empty?
+ reader = RDF::Reader.open(params["uri"], reader_opts)
+ params["in_fmt"] = reader.class.to_sym if params["in_fmt"].nil? || params["in_fmt"] == 'content'
+ else
+ return ["text/html", ""]
+ end
+ content_type = reader.class.format.content_type.first
+
+ graph = RDF::Graph.new << reader
+
+ params["fmt"] = writer(params["fmt"])
+ [content_type, graph.dump(params["fmt"].to_sym, reader_opts)]
+ rescue Exception => e
+ @error = "#{e.class}: #{e.message}"
+ puts @error # to log
+ content_type ||= accepts.first
+ case content_type
+ when /html/
+ [content_type, @error] # XXX
+ when /xml/
+ [content_type, @error.to_xml]
+ else
+ [content_type, @error]
+ end
+ raise
+ end
+
+ end
+ end
+end
+
+module RDF
+ class Format
+ def self.to_sym
+ elements = self.to_s.split("::")
+ sym = elements.pop
+ sym = elements.pop if sym == 'Format'
+ sym.downcase.to_s
+ end
+ end
+
+ class Reader
+ def self.to_sym
+ elements = self.to_s.split("::")
+ sym = elements.pop
+ sym = elements.pop if sym == 'Reader'
+ sym.downcase.to_s
+ end
+ end
+
+ class Writer
+ def self.to_sym
+ elements = self.to_s.split("::")
+ sym = elements.pop
+ sym = elements.pop if sym == 'Writer'
+ sym.downcase.to_s
+ end
+ end
+end
0  lib/rdf/portal/version.rb
No changes.
28 lib/rdf/portal/views/_distiller_head.erubis
@@ -0,0 +1,28 @@
+<script type="text/javascript" charset="utf-8" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
+<script type="text/javascript">
+// Navigation
+$(function () {
+ // Display field sets having class of
+ // Clicking on a tab hides fieldsets not having that hash element as a class
+ $('nav.distiller a').click(function() {
+ var cls = this.hash.substr(1);
+ $('fieldset').hide();
+ $('fieldset.' + cls).show();
+ $('nav.distiller a').removeClass('selected');
+ $(this).addClass('selected');
+ window.location.hash = '#' + cls;
+ });
+
+ // Default tab, if none selected
+ if (window.location.hash === '') {
+ var dflt_hash = $('nav.distiller a:first').attr('href');
+ window.location.hash = dflt_hash;
+ }
+
+ // Select appropriate nav tab
+ var cls = window.location.hash.substr(1);
+ $('nav.distiller a.' + cls).click();
+
+});
+
+</script>
3  lib/rdf/portal/views/_footer.erubis
@@ -0,0 +1,3 @@
+<footer>
+ Thanks for your support
+</footer>
9 lib/rdf/portal/views/_header.erubis
@@ -0,0 +1,9 @@
+<header>
+ <nav class="main">
+ <ul>
+ <li><a href="/">Home</a></li>
+ <li><a href="/distiller">Distiller</a></li>
+ <li><a href="/about">About</a></li>
+ </ul>
+ </nav>
+</header>
64 lib/rdf/portal/views/about.erubis
@@ -0,0 +1,64 @@
+<section>
+ <h1><%= title %></h1>
+ <p>
+ <a href="http://rdf.rubyforge.org">RDF.rb</a> is a suite of Ruby Gems providing classes that implement elements of the
+ <a href="http://www.w3.org/TR/rdf-concepts/">Resource Description Framework</a> in Ruby.
+ </p>
+
+ <section class="informative">
+ <h2>About RDF</h2>
+ <p>
+ Short for <em><strong>R</strong>esource <strong>D</strong>escription
+ <strong>F</strong>ramework</em>, <a>RDF</a> is the language of the Semantic Web. It
+ provides for a number of machine-readable formats for expressing meta-data.
+ </p>
+ <p>
+ Developed under the guidance of the World Wide Web Consortium (W3C), RDF was designed to create a
+ machine-readable graph of information about different entities called Resources.
+ </p>
+ <p>
+ Resources are defined by a <dfn title="Universal Resource Identifier">URI</dfn>(Universal Resource
+ Identifiers) and are defined by a series of statements relating a <strong>Subject</strong> resource using
+ a <strong>Predicate</strong> to an <strong>Object</strong> resource and a literal, such as a string or
+ date.
+ </p>
+ <p>
+ RDF is based on the idea of making statements about resources in the form of subject-predicate-object
+ expressions, known as <dfn>Statement</dfn>s in RDF terminology. <dfn>Subject</dfn>s represent resources,
+ typically associated with a URI. <dfn>Predicate</dfn>s are also represented as URIs, and refer to a
+ particular defined Ontology relative to a namespace. <dfn>Object</dfn>s are either other URI resources or
+ literals, such as strings or typed scalar data types such as dates and durations.
+ </p>
+ </section>
+
+ <section>
+ <h2>About the RDF.rb service</h2>
+ <p>
+ The service provides a means of manipulating RDF resources as a web service using the <a
+ href="https://rubygems.org/gems/linkeddata">linkeddata</a> gem, based on RDF.rb and related gems. The
+ service includes Readers and Writers for the following RDF serialization formats:
+ <dl>
+ <% RDF::Format.each do |format|
+ next if format.content_type.empty?
+ %>
+ <dt><%= format.to_s.split("::")[-2] %></dt>
+ <dd>
+ This format has a
+ <% if format.reader && format.writer %>
+ reader and a writer
+ <% elsif format.reader %>
+ reader
+ <% else %>
+ writer
+ <% end%>
+ for <%= format.content_type.join(", ") %>.
+ </dd>
+ <% end %>
+ </dl>
+ </p>
+ <p>
+ The <a href="/distiller">distiller</a> can be used to read existing web resources, or
+ data from an input form and generate the output in an alternative format.
+ </p>
+ </section>
+</section>
96 lib/rdf/portal/views/distiller.erubis
@@ -0,0 +1,96 @@
+<% require 'cgi' %>
+<h1><%= title %></h1>
+<p>
+ RDF.rb is a <span property="doap:programming-language">Ruby</span> Gem
+ implementing RDF graphs, readers and writers to help integrate semantic technologies
+ into Ruby projects.
+</p>
+<p>
+ The distiller transforms data between different RDF formats.
+ The <a href="#distiller">form below</a> can be used to start the service installed at this site.
+</p>
+<nav class="distiller">
+ <ul>
+ <li><a class='url' href="#url">From URL</a></li>
+ <li><a class='upload' href="#upload">From File Upload</a></li>
+ <li><a class='input' href="#input">From File Upload</a></li>
+ </ul>
+</nav>
+<form action="/distiller" method="post">
+ <fieldset class="url upload input">
+ <legend>Distill RDF Information</legend>
+ <fieldset class="url upload input">
+ <label for="uri">URI</label>
+ <input id="uri" name="uri" size="80" type="text" value="<%= params['uri'] %>"/>
+ </fieldset>
+ <fieldset class="url upload input">
+ <legend>Options</legend>
+ <p>
+ <label for="in_fmt">Input Format:</label>
+ <select id="in_fmt" name="in_fmt">
+ <option value="content" <%= 'selected="selected"' if params["in_fmt"].to_s. == "content" %>>
+ Content Detect
+ </option>
+ <% formats(:reader).each do |sym| %>
+ <option value="<%=sym.downcase%>" <%= 'selected="selected"' if params["in_fmt"].to_s == sym.to_s %>><%=sym %></option>
+ <% end %>
+ </select>
+ <label for="fmt">Output Format:</label>
+ <select id="fmt" name="fmt">
+ <option value="accept" <%= 'selected="selected"' if params["fmt"].to_s == "accept" %>>
+ Accept Detect
+ </option>
+ <% formats(:writer).each do |sym| %>
+ <option value="<%=sym.downcase%>" <%= 'selected="selected"' if params["fmt"].to_s == sym.to_s %>><%=sym %></option>
+ <% end %>
+ </select>
+ <label for="debug">Show Parser debug information:</label>
+ <input id="debug" name="debug" type="checkbox" value="true" />
+ <label for="validate">Validate Input:</label>
+ <input id="validate" name="strict" type="checkbox" value="true" />
+ <label for="raw">Raw Output:</label>
+ <input id="raw" name="raw" type="checkbox" value="true" />
+ </p>
+ </fieldset>
+ <fieldset class="upload">
+ <legend>File Upload</legend>
+ <input type="file" name="datafile" size="40">
+ </fieldset>
+ <fieldset class="input">
+ <legend>Markup</legend>
+ <textarea class="input" cols="120" id="content" name="content" rows="15"></textarea>
+ </fieldset>
+ <input name="commit" type="submit" value="Submit" />
+ </fieldset>
+</form>
+
+<% if @error -%>
+ <h2>Errors</h2>
+ <p><%= CGI.escapeHTML(@error) %></p>
+<% end -%>
+
+<% if @output -%>
+ <h2>Result</h2>
+ <textarea rows="20" cols="120"><%= CGI.escapeHTML(@output)%></textarea>
+<% end -%>
+
+<% if @debug %>
+ <h2>Parser Debug Information:</h2>
+ <textarea rows="20" cols="120"><%= CGI.escapeHTML(@debug.join("\n")) %></textarea>
+<% end %>
+
+<h2>Alternative access to the Distiller</h2>
+<p>The distiller URI may be used directly with an HTML GET by passing the source URI and fmt options as parameters:</p>
+<pre class="alt_acess">
+ <%=
+ url = url('/distiller')
+ base = params["uri"].to_s.empty? ? 'http://www.example.com/' : params["uri"]
+ url_params = ["raw=true"]
+ url_params << %(fmt=#{params["fmt"]}) unless params["fmt"].nil? || params["fmt"].to_s == "accept"
+ url_params << %(in_fmt=#{params["in_fmt"]}) unless params["in_fmt"].nil? || params["in_fmt"] == :content
+ url_params << %(uri=#{CGI.escape(base)})
+ url += "?#{url_params.join('&')}" unless url_params.empty?
+ %(<a href="#{url}">#{url}</a>)
+ %>
+</pre>
+
3  lib/rdf/portal/views/index.erubis
@@ -0,0 +1,3 @@
+<section>
+ <h1><%= title %></h1>
+</section>
13 lib/rdf/portal/views/layout.erubis
@@ -0,0 +1,13 @@
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <title><%= title %></title>
+ <link rel="stylesheet" href="/css/main.css" type="text/css" media="screen, projection" />
+ <%= partial "#{head}_head".to_sym rescue nil %>
+ </head>
+ <body>
+ <%= partial :header %>
+ <%= yield %>
+ <%= partial :footer %>
+ </body>
+</html>
23 lib/sinatra/partials.rb
@@ -0,0 +1,23 @@
+require 'sinatra'
+
+# from https://gist.github.com/119874
+# stolen from http://github.com/cschneid/irclogger/blob/master/lib/partials.rb
+# and made a lot more robust by me
+# this implementation uses erb by default. if you want to use any other template mechanism
+# then replace `erb` on line 13 and line 17 with `haml` or whatever
+module Sinatra::Partials
+ def partial(template, *args)
+ template_array = template.to_s.split('/')
+ template = template_array[0..-2].join('/') + "/_#{template_array[-1]}"
+ options = args.last.is_a?(Hash) ? args.pop : {}
+ options.merge!(:layout => false)
+ if collection = options.delete(:collection) then
+ collection.inject([]) do |buffer, member|
+ buffer << erubis(:"#{template}", options.merge(:layout =>
+ false, :locals => {template_array[-1].to_sym => member}))
+ end.join("\n")
+ else
+ erubis(:"#{template}", options)
+ end
+ end
+end
47 public/css/main.css
@@ -0,0 +1,47 @@
+body
+{
+ font: normal 90%/1.5em 'Trebuchet MS', Tahoma, sans-serif;
+ color: #555;
+ background: #FFF;
+ margin: 0;
+ padding: 4em 6em;
+}
+h1 { font-size: 300%; text-align:center; padding: 0.67em 1em 1.33em; margin: 0;}
+
+nav ul {
+ font: bolder 1em 'Trebuchet MS', sans-serif;
+ color: #FFF;
+ list-style: none;
+ margin: 0; padding: 0;
+}
+nav li {
+ display: inline;
+}
+nav li a {
+ float: left;
+ display: block;
+ padding: 3px 12px;
+ color: #FFF;
+ background-color: #333;
+ text-decoration: none;
+ border-right: 1px solid #272727;
+}
+nav li a:hover {
+ background: #65944A;
+ color: #FFF;
+}
+nav li a.selected {
+ background: #65944A;
+ color: #FFF;
+}
+
+nav.distiller div.tabs
+{
+ clear:left;
+ border: 4px solid #65944A;
+ padding: 1em 3em;
+ color:black;
+ background: #98b786;
+}
+
+form { clear:left; }
1  rdf-portal.gemspec
128 sinatra.log
@@ -0,0 +1,128 @@
+Exception `LoadError' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36 - no such file to load -- sinatra
+Exception `LoadError' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36 - no such file to load -- sinatra/linkeddata
+Exception `LoadError' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36 - no such file to load -- json/ext/1.9/parser
+Exception `LoadError' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:61 - no such file to load -- json/ext/1.9/parser
+Exception `LoadError' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36 - no such file to load -- sparql/client
+Exception `LoadError' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36 - no such file to load -- mongrel
+Exception `LoadError' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:61 - no such file to load -- mongrel
+Exception `LoadError' at /Users/gregg/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.2.2/lib/rack/handler.rb:37 - no such file to load -- mongrel
+#<Rack::CommonLogger:0x00000102878838
+ @app=
+ #<Rack::ShowExceptions:0x00000101f8c710
+ @app=
+ #<Rack::Lint:0x00000101f8c738 @app=My::Application, @content_length=nil>,
+ @template=
+ #<ERB:0x00000101f8c6e8
+ @enc=#<Encoding:US-ASCII>,
+ @filename=nil,
+ @safe_level=nil,
+ @src=
+ "#coding:US-ASCII\n_erbout = ''; _erbout.concat \"<!DOCTYPE HTML PUBLIC \\\"-//W3C//DTD HTML 4.01 Transitional//EN\\\" \\\"http://www.w3.org/TR/html4/loose.dtd\\\">\\n<html lang=\\\"en\\\">\\n<head>\\n <meta http-equiv=\\\"content-type\\\" content=\\\"text/html; charset=utf-8\\\" />\\n <meta name=\\\"robots\\\" content=\\\"NONE,NOARCHIVE\\\" />\\n <title>\"\n\n\n\n\n; _erbout.concat((h exception.class ).to_s); _erbout.concat \" at \"; _erbout.concat((h path ).to_s); _erbout.concat \"</title>\\n <style type=\\\"text/css\\\">\\n html * { padding:0; margin:0; }\\n body * { padding:10px 20px; }\\n body * * { padding:0; }\\n body { font:small sans-serif; }\\n body>div { border-bottom:1px solid #ddd; }\\n h1 { font-weight:normal; }\\n h2 { margin-bottom:.8em; }\\n h2 span { font-size:80%; color:#666; font-weight:normal; }\\n h3 { margin:1em 0 .5em 0; }\\n h4 { margin:0 0 .5em 0; font-weight: normal; }\\n table {\\n border:1px solid #ccc; border-collapse: collapse; background:white; }\\n tbody td, tbody th { vertical-align:top; padding:2px 3px; }\\n thead th {\\n padding:1px 6px 1px 3px; background:#fefefe; text-align:left;\\n font-weight:normal; font-size:11px; border:1px solid #ddd; }\\n tbody th { text-align:right; color:#666; padding-right:.5em; }\\n table.vars { margin:5px 0 2px 40px; }\\n table.vars td, table.req td { font-family:monospace; }\\n table td.code { width:100%;}\\n table td.code div { overflow:hidden; }\\n table.source th { color:#666; }\\n table.source td {\\n font-family:monospace; white-space:pre; border-bottom:1px solid #eee; }\\n ul.traceback { list-style-type:none; }\\n ul.traceback li.frame { margin-bottom:1em; }\\n div.context { margin: 10px 0; }\\n div.context ol {\\n padding-left:30px; margin:0 10px; list-style-position: inside; }\\n div.context ol li {\\n font-family:monospace; white-space:pre; color:#666; cursor:pointer; }\\n div.context ol.context-line li { color:black; background-color:#ccc; }\\n div.context ol.context-line li span { float: right; }\\n div.commands { margin-left: 40px; }\\n div.commands a { color:black; text-decoration:none; }\\n #summary { background: #ffc; }\\n #summary h2 { font-weight: normal; color: #666; }\\n #summary ul#quicklinks { list-style-type: none; margin-bottom: 2em; }\\n #summary ul#quicklinks li { float: left; padding: 0 1em; }\\n #summary ul#quicklinks>li+li { border-left: 1px #666 solid; }\\n #explanation { background:#eee; }\\n #template, #template-not-exist { background:#f6f6f6; }\\n #template-not-exist ul { margin: 0 0 0 20px; }\\n #traceback { background:#eee; }\\n #requestinfo { background:#f6f6f6; padding-left:120px; }\\n #summary table { border:none; background:transparent; }\\n #requestinfo h2, #requestinfo h3 { position:relative; margin-left:-100px; }\\n #requestinfo h3 { margin-bottom:-1em; }\\n .error { background: #ffc; }\\n .specific { color:#cc3300; font-weight:bold; }\\n </style>\\n <script type=\\\"text/javascript\\\">\\n //<!--\\n function getElementsByClassName(oElm, strTagName, strClassName){\\n // Written by Jonathan Snook, http://www.snook.ca/jon;\\n // Add-ons by Robert Nyman, http://www.robertnyman.com\\n var arrElements = (strTagName == \\\"*\\\" && document.all)? document.all :\\n oElm.getElementsByTagName(strTagName);\\n var arrReturnElements = new Array();\\n strClassName = strClassName.replace(/\\\\-/g, \\\"\\\\\\\\-\\\");\\n var oRegExp = new RegExp(\\\"(^|\\\\\\\\s)\\\" + strClassName + \\\"(\\\\\\\\s|$$)\\\");\\n var oElement;\\n for(var i=0; i<arrElements.length; i++){\\n oElement = arrElements[i];\\n if(oRegExp.test(oElement.className)){\\n arrReturnElements.push(oElement);\\n }\\n }\\n return (arrReturnElements)\\n }\\n function hideAll(elems) {\\n for (var e = 0; e < elems.length; e++) {\\n elems[e].style.display = 'none';\\n }\\n }\\n window.onload = function() {\\n hideAll(getElementsByClassName(document, 'table', 'vars'));\\n hideAll(getElementsByClassName(document, 'ol', 'pre-context'));\\n hideAll(getElementsByClassName(document, 'ol', 'post-context'));\\n }\\n function toggle() {\\n for (var i = 0; i < arguments.length; i++) {\\n var e = document.getElementById(arguments[i]);\\n if (e) {\\n e.style.display = e.style.display == 'none' ? 'block' : 'none';\\n }\\n }\\n return false;\\n }\\n function varToggle(link, id) {\\n toggle('v' + id);\\n var s = link.getElementsByTagName('span')[0];\\n var uarr = String.fromCharCode(0x25b6);\\n var darr = String.fromCharCode(0x25bc);\\n s.innerHTML = s.innerHTML == uarr ? darr : uarr;\\n return false;\\n }\\n //-->\\n </script>\\n</head>\\n<body>\\n\\n<div id=\\\"summary\\\">\\n <h1>\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n; _erbout.concat((h exception.class ).to_s); _erbout.concat \" at \"; _erbout.concat((h path ).to_s); _erbout.concat \"</h1>\\n <h2>\"\n; _erbout.concat((h exception.message ).to_s); _erbout.concat \"</h2>\\n <table><tr>\\n <th>Ruby</th>\\n <td><code>\"\n\n\n; _erbout.concat((h frames.first.filename ).to_s); _erbout.concat \"</code>: in <code>\"; _erbout.concat((h frames.first.function ).to_s); _erbout.concat \"</code>, line \"; _erbout.concat((h frames.first.lineno ).to_s); _erbout.concat \"</td>\\n </tr><tr>\\n <th>Web</th>\\n <td><code>\"\n\n\n; _erbout.concat((h req.request_method ).to_s); _erbout.concat \" \"; _erbout.concat((h(req.host + path)).to_s); _erbout.concat \"</code></td>\\n </tr></table>\\n\\n <h3>Jump to:</h3>\\n <ul id=\\\"quicklinks\\\">\\n <li><a href=\\\"#get-info\\\">GET</a></li>\\n <li><a href=\\\"#post-info\\\">POST</a></li>\\n <li><a href=\\\"#cookie-info\\\">Cookies</a></li>\\n <li><a href=\\\"#env-info\\\">ENV</a></li>\\n </ul>\\n</div>\\n\\n<div id=\\\"traceback\\\">\\n <h2>Traceback <span>(innermost first)</span></h2>\\n <ul class=\\\"traceback\\\">\\n\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n; frames.each { |frame| ; _erbout.concat \"\\n <li class=\\\"frame\\\">\\n <code>\"\n\n; _erbout.concat((h frame.filename ).to_s); _erbout.concat \"</code>: in <code>\"; _erbout.concat((h frame.function ).to_s); _erbout.concat \"</code>\\n\\n \"\n\n; if frame.context_line ; _erbout.concat \"\\n <div class=\\\"context\\\" id=\\\"c\"\n; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"\\\">\\n \"\n; if frame.pre_context ; _erbout.concat \"\\n <ol start=\\\"\"\n; _erbout.concat((h frame.pre_context_lineno+1 ).to_s); _erbout.concat \"\\\" class=\\\"pre-context\\\" id=\\\"pre\"; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"\\\">\\n \"\n; frame.pre_context.each { |line| ; _erbout.concat \"\\n <li onclick=\\\"toggle('pre\"\n; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"', 'post\"; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"')\\\">\"; _erbout.concat((h line ).to_s); _erbout.concat \"</li>\\n \"\n; } ; _erbout.concat \"\\n </ol>\\n \"\n\n; end ; _erbout.concat \"\\n\\n <ol start=\\\"\"\n\n; _erbout.concat((h frame.lineno ).to_s); _erbout.concat \"\\\" class=\\\"context-line\\\">\\n <li onclick=\\\"toggle('pre\"\n; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"', 'post\"; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"')\\\">\"; _erbout.concat((h frame.context_line ).to_s); _erbout.concat \"<span>...</span></li></ol>\\n\\n \"\n\n; if frame.post_context ; _erbout.concat \"\\n <ol start='\"\n; _erbout.concat((h frame.lineno+1 ).to_s); _erbout.concat \"' class=\\\"post-context\\\" id=\\\"post\"; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"\\\">\\n \"\n; frame.post_context.each { |line| ; _erbout.concat \"\\n <li onclick=\\\"toggle('pre\"\n; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"', 'post\"; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"')\\\">\"; _erbout.concat((h line ).to_s); _erbout.concat \"</li>\\n \"\n; } ; _erbout.concat \"\\n </ol>\\n \"\n\n; end ; _erbout.concat \"\\n </div>\\n \"\n\n; end ; _erbout.concat \"\\n </li>\\n\"\n\n; } ; _erbout.concat \"\\n </ul>\\n</div>\\n\\n<div id=\\\"requestinfo\\\">\\n <h2>Request information</h2>\\n\\n <h3 id=\\\"get-info\\\">GET</h3>\\n \"\n\n\n\n\n\n\n\n; unless req.GET.empty? ; _erbout.concat \"\\n <table class=\\\"req\\\">\\n <thead>\\n <tr>\\n <th>Variable</th>\\n <th>Value</th>\\n </tr>\\n </thead>\\n <tbody>\\n \"\n\n\n\n\n\n\n\n\n; req.GET.sort_by { |k, v| k.to_s }.each { |key, val| ; _erbout.concat \"\\n <tr>\\n <td>\"\n\n; _erbout.concat((h key ).to_s); _erbout.concat \"</td>\\n <td class=\\\"code\\\"><div>\"\n; _erbout.concat((h val.inspect ).to_s); _erbout.concat \"</div></td>\\n </tr>\\n \"\n\n; } ; _erbout.concat \"\\n </tbody>\\n </table>\\n \"\n\n\n; else ; _erbout.concat \"\\n <p>No GET data.</p>\\n \"\n\n; end ; _erbout.concat \"\\n\\n <h3 id=\\\"post-info\\\">POST</h3>\\n \"\n\n\n; unless req.POST.empty? ; _erbout.concat \"\\n <table class=\\\"req\\\">\\n <thead>\\n <tr>\\n <th>Variable</th>\\n <th>Value</th>\\n </tr>\\n </thead>\\n <tbody>\\n \"\n\n\n\n\n\n\n\n\n; req.POST.sort_by { |k, v| k.to_s }.each { |key, val| ; _erbout.concat \"\\n <tr>\\n <td>\"\n\n; _erbout.concat((h key ).to_s); _erbout.concat \"</td>\\n <td class=\\\"code\\\"><div>\"\n; _erbout.concat((h val.inspect ).to_s); _erbout.concat \"</div></td>\\n </tr>\\n \"\n\n; } ; _erbout.concat \"\\n </tbody>\\n </table>\\n \"\n\n\n; else ; _erbout.concat \"\\n <p>No POST data.</p>\\n \"\n\n; end ; _erbout.concat \"\\n\\n\\n <h3 id=\\\"cookie-info\\\">COOKIES</h3>\\n \"\n\n\n\n; unless req.cookies.empty? ; _erbout.concat \"\\n <table class=\\\"req\\\">\\n <thead>\\n <tr>\\n <th>Variable</th>\\n <th>Value</th>\\n </tr>\\n </thead>\\n <tbody>\\n \"\n\n\n\n\n\n\n\n\n; req.cookies.each { |key, val| ; _erbout.concat \"\\n <tr>\\n <td>\"\n\n; _erbout.concat((h key ).to_s); _erbout.concat \"</td>\\n <td class=\\\"code\\\"><div>\"\n; _erbout.concat((h val.inspect ).to_s); _erbout.concat \"</div></td>\\n </tr>\\n \"\n\n; } ; _erbout.concat \"\\n </tbody>\\n </table>\\n \"\n\n\n; else ; _erbout.concat \"\\n <p>No cookie data.</p>\\n \"\n\n; end ; _erbout.concat \"\\n\\n <h3 id=\\\"env-info\\\">Rack ENV</h3>\\n <table class=\\\"req\\\">\\n <thead>\\n <tr>\\n <th>Variable</th>\\n <th>Value</th>\\n </tr>\\n </thead>\\n <tbody>\\n \"\n\n\n\n\n\n\n\n\n\n\n; env.sort_by { |k, v| k.to_s }.each { |key, val| ; _erbout.concat \"\\n <tr>\\n <td>\"\n\n; _erbout.concat((h key ).to_s); _erbout.concat \"</td>\\n <td class=\\\"code\\\"><div>\"\n; _erbout.concat((h val ).to_s); _erbout.concat \"</div></td>\\n </tr>\\n \"\n\n; } ; _erbout.concat \"\\n </tbody>\\n </table>\\n\\n</div>\\n\\n<div id=\\\"explanation\\\">\\n <p>\\n You're seeing this error because you use <code>Rack::ShowExceptions</code>.\\n </p>\\n</div>\\n\\n</body>\\n</html>\\n\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n; _erbout.force_encoding(__ENCODING__)"Exception `Sinatra::NotFound' at /Users/gregg/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:757 - Sinatra::NotFound
+Exception `Errno::ENOTCONN' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/server.rb:134 - Socket is not connected
+Exception `Errno::EBADF' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/server.rb:90 - Bad file descriptor
+Exception `WEBrick::HTTPStatus::EOFError' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/httpserver.rb:55 - WEBrick::HTTPStatus::EOFError
+>>,
+ @logger=#<File:sinatra.log>>
+My::Application
+Using Ext extension for JSON.
+[2011-03-25 15:36:22] INFO WEBrick 1.3.1
+[2011-03-25 15:36:22] INFO ruby 1.9.2 (2011-02-18) [x86_64-darwin10.6.0]
+[2011-03-25 15:36:22] INFO WEBrick::HTTPServer#start: pid=20891 port=3000
+127.0.0.1 - - [25/Mar/2011 15:36:27] "GET /hello HTTP/1.1" 200 - 0.0216
+127.0.0.1 - - [25/Mar/2011 15:36:27] "GET /favicon.ico HTTP/1.1" 404 420 0.0007
+[2011-03-25 15:36:29] INFO going to shutdown ...
+[2011-03-25 15:36:29] INFO WEBrick::HTTPServer#start done.
+Exception `LoadError' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36 - no such file to load -- sinatra
+Exception `LoadError' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36 - no such file to load -- sinatra/linkeddata
+Exception `LoadError' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36 - no such file to load -- json/ext/1.9/parser
+Exception `LoadError' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:61 - no such file to load -- json/ext/1.9/parser
+Exception `LoadError' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36 - no such file to load -- sparql/client
+Exception `LoadError' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36 - no such file to load -- mongrel
+Exception `LoadError' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:61 - no such file to load -- mongrel
+Exception `LoadError' at /Users/gregg/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.2.2/lib/rack/handler.rb:37 - no such file to load -- mongrel
+#<Rack::CommonLogger:0x00000102914170
+ @app=
+ #<Rack::ShowExceptions:0x00000102833058
+ @app=
+ #<Rack::Lint:0x00000102833080 @app=My::Application, @content_length=nil>,
+ @template=
+ #<ERB:0x00000102833030
+ @enc=#<Encoding:US-ASCII>,
+ @filename=nil,
+ @safe_level=nil,
+ @src=
+ "#coding:US-ASCII\n_erbout = ''; _erbout.concat \"<!DOCTYPE HTML PUBLIC \\\"-//W3C//DTD HTML 4.01 Transitional//EN\\\" \\\"http://www.w3.org/TR/html4/loose.dtd\\\">\\n<html lang=\\\"en\\\">\\n<head>\\n <meta http-equiv=\\\"content-type\\\" content=\\\"text/html; charset=utf-8\\\" />\\n <meta name=\\\"robots\\\" content=\\\"NONE,NOARCHIVE\\\" />\\n <title>\"\n\n\n\n\n; _erbout.concat((h exception.class ).to_s); _erbout.concat \" at \"; _erbout.concat((h path ).to_s); _erbout.concat \"</title>\\n <style type=\\\"text/css\\\">\\n html * { padding:0; margin:0; }\\n body * { padding:10px 20px; }\\n body * * { padding:0; }\\n body { font:small sans-serif; }\\n body>div { border-bottom:1px solid #ddd; }\\n h1 { font-weight:normal; }\\n h2 { margin-bottom:.8em; }\\n h2 span { font-size:80%; color:#666; font-weight:normal; }\\n h3 { margin:1em 0 .5em 0; }\\n h4 { margin:0 0 .5em 0; font-weight: normal; }\\n table {\\n border:1px solid #ccc; border-collapse: collapse; background:white; }\\n tbody td, tbody th { vertical-align:top; padding:2px 3px; }\\n thead th {\\n padding:1px 6px 1px 3px; background:#fefefe; text-align:left;\\n font-weight:normal; font-size:11px; border:1px solid #ddd; }\\n tbody th { text-align:right; color:#666; padding-right:.5em; }\\n table.vars { margin:5px 0 2px 40px; }\\n table.vars td, table.req td { font-family:monospace; }\\n table td.code { width:100%;}\\n table td.code div { overflow:hidden; }\\n table.source th { color:#666; }\\n table.source td {\\n font-family:monospace; white-space:pre; border-bottom:1px solid #eee; }\\n ul.traceback { list-style-type:none; }\\n ul.traceback li.frame { margin-bottom:1em; }\\n div.context { margin: 10px 0; }\\n div.context ol {\\n padding-left:30px; margin:0 10px; list-style-position: inside; }\\n div.context ol li {\\n font-family:monospace; white-space:pre; color:#666; cursor:pointer; }\\n div.context ol.context-line li { color:black; background-color:#ccc; }\\n div.context ol.context-line li span { float: right; }\\n div.commands { margin-left: 40px; }\\n div.commands a { color:black; text-decoration:none; }\\n #summary { background: #ffc; }\\n #summary h2 { font-weight: normal; color: #666; }\\n #summary ul#quicklinks { list-style-type: none; margin-bottom: 2em; }\\n #summary ul#quicklinks li { float: left; padding: 0 1em; }\\n #summary ul#quicklinks>li+li { border-left: 1px #666 solid; }\\n #explanation { background:#eee; }\\n #template, #template-not-exist { background:#f6f6f6; }\\n #template-not-exist ul { margin: 0 0 0 20px; }\\n #traceback { background:#eee; }\\n #requestinfo { background:#f6f6f6; padding-left:120px; }\\n #summary table { border:none; background:transparent; }\\n #requestinfo h2, #requestinfo h3 { position:relative; margin-left:-100px; }\\n #requestinfo h3 { margin-bottom:-1em; }\\n .error { background: #ffc; }\\n .specific { color:#cc3300; font-weight:bold; }\\n </style>\\n <script type=\\\"text/javascript\\\">\\n //<!--\\n function getElementsByClassName(oElm, strTagName, strClassName){\\n // Written by Jonathan Snook, http://www.snook.ca/jon;\\n // Add-ons by Robert Nyman, http://www.robertnyman.com\\n var arrElements = (strTagName == \\\"*\\\" && document.all)? document.all :\\n oElm.getElementsByTagName(strTagName);\\n var arrReturnElements = new Array();\\n strClassName = strClassName.replace(/\\\\-/g, \\\"\\\\\\\\-\\\");\\n var oRegExp = new RegExp(\\\"(^|\\\\\\\\s)\\\" + strClassName + \\\"(\\\\\\\\s|$$)\\\");\\n var oElement;\\n for(var i=0; i<arrElements.length; i++){\\n oElement = arrElements[i];\\n if(oRegExp.test(oElement.className)){\\n arrReturnElements.push(oElement);\\n }\\n }\\n return (arrReturnElements)\\n }\\n function hideAll(elems) {\\n for (var e = 0; e < elems.length; e++) {\\n elems[e].style.display = 'none';\\n }\\n }\\n window.onload = function() {\\n hideAll(getElementsByClassName(document, 'table', 'vars'));\\n hideAll(getElementsByClassName(document, 'ol', 'pre-context'));\\n hideAll(getElementsByClassName(document, 'ol', 'post-context'));\\n }\\n function toggle() {\\n for (var i = 0; i < arguments.length; i++) {\\n var e = document.getElementById(arguments[i]);\\n if (e) {\\n e.style.display = e.style.display == 'none' ? 'block' : 'none';\\n }\\n }\\n return false;\\n }\\n function varToggle(link, id) {\\n toggle('v' + id);\\n var s = link.getElementsByTagName('span')[0];\\n var uarr = String.fromCharCode(0x25b6);\\n var darr = String.fromCharCode(0x25bc);\\n s.innerHTML = s.innerHTML == uarr ? darr : uarr;\\n return false;\\n }\\n //-->\\n </script>\\n</head>\\n<body>\\n\\n<div id=\\\"summary\\\">\\n <h1>\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n; _erbout.concat((h exception.class ).to_s); _erbout.concat \" at \"; _erbout.concat((h path ).to_s); _erbout.concat \"</h1>\\n <h2>\"\n; _erbout.concat((h exception.message ).to_s); _erbout.concat \"</h2>\\n <table><tr>\\n <th>Ruby</th>\\n <td><code>\"\n\n\n; _erbout.concat((h frames.first.filename ).to_s); _erbout.concat \"</code>: in <code>\"; _erbout.concat((h frames.first.function ).to_s); _erbout.concat \"</code>, line \"; _erbout.concat((h frames.first.lineno ).to_s); _erbout.concat \"</td>\\n </tr><tr>\\n <th>Web</th>\\n <td><code>\"\n\n\n; _erbout.concat((h req.request_method ).to_s); _erbout.concat \" \"; _erbout.concat((h(req.host + path)).to_s); _erbout.concat \"</code></td>\\n </tr></table>\\n\\n <h3>Jump to:</h3>\\n <ul id=\\\"quicklinks\\\">\\n <li><a href=\\\"#get-info\\\">GET</a></li>\\n <li><a href=\\\"#post-info\\\">POST</a></li>\\n <li><a href=\\\"#cookie-info\\\">Cookies</a></li>\\n <li><a href=\\\"#env-info\\\">ENV</a></li>\\n </ul>\\n</div>\\n\\n<div id=\\\"traceback\\\">\\n <h2>Traceback <span>(innermost first)</span></h2>\\n <ul class=\\\"traceback\\\">\\n\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n; frames.each { |frame| ; _erbout.concat \"\\n <li class=\\\"frame\\\">\\n <code>\"\n\n; _erbout.concat((h frame.filename ).to_s); _erbout.concat \"</code>: in <code>\"; _erbout.concat((h frame.function ).to_s); _erbout.concat \"</code>\\n\\n \"\n\n; if frame.context_line ; _erbout.concat \"\\n <div class=\\\"context\\\" id=\\\"c\"\n; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"\\\">\\n \"\n; if frame.pre_context ; _erbout.concat \"\\n <ol start=\\\"\"\n; _erbout.concat((h frame.pre_context_lineno+1 ).to_s); _erbout.concat \"\\\" class=\\\"pre-context\\\" id=\\\"pre\"; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"\\\">\\n \"\n; frame.pre_context.each { |line| ; _erbout.concat \"\\n <li onclick=\\\"toggle('pre\"\n; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"', 'post\"; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"')\\\">\"; _erbout.concat((h line ).to_s); _erbout.concat \"</li>\\n \"\n; } ; _erbout.concat \"\\n </ol>\\n \"\n\n; end ; _erbout.concat \"\\n\\n <ol start=\\\"\"\n\n; _erbout.concat((h frame.lineno ).to_s); _erbout.concat \"\\\" class=\\\"context-line\\\">\\n <li onclick=\\\"toggle('pre\"\n; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"', 'post\"; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"')\\\">\"; _erbout.concat((h frame.context_line ).to_s); _erbout.concat \"<span>...</span></li></ol>\\n\\n \"\n\n; if frame.post_context ; _erbout.concat \"\\n <ol start='\"\n; _erbout.concat((h frame.lineno+1 ).to_s); _erbout.concat \"' class=\\\"post-context\\\" id=\\\"post\"; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"\\\">\\n \"\n; frame.post_context.each { |line| ; _erbout.concat \"\\n <li onclick=\\\"toggle('pre\"\n; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"', 'post\"; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"')\\\">\"; _erbout.concat((h line ).to_s); _erbout.concat \"</li>\\n \"\n; } ; _erbout.concat \"\\n </ol>\\n \"\n\n; end ; _erbout.concat \"\\n </div>\\n \"\n\n; end ; _erbout.concat \"\\n </li>\\n\"\n\n; } ; _erbout.concat \"\\n </ul>\\n</div>\\n\\n<div id=\\\"requestinfo\\\">\\n <h2>Request information</h2>\\n\\n <h3 id=\\\"get-info\\\">GET</h3>\\n \"\n\n\n\n\n\n\n\n; unless req.GET.empty? ; _erbout.concat \"\\n <table class=\\\"req\\\">\\n <thead>\\n <tr>\\n <th>Variable</th>\\n <th>Value</th>\\n </tr>\\n </thead>\\n <tbody>\\n \"\n\n\n\n\n\n\n\n\n; req.GET.sort_by { |k, v| k.to_s }.each { |key, val| ; _erbout.concat \"\\n <tr>\\n <td>\"\n\n; _erbout.concat((h key ).to_s); _erbout.concat \"</td>\\n <td class=\\\"code\\\"><div>\"\n; _erbout.concat((h val.inspect ).to_s); _erbout.concat \"</div></td>\\n </tr>\\n \"\n\n; } ; _erbout.concat \"\\n </tbody>\\n </table>\\n \"\n\n\n; else ; _erbout.concat \"\\n <p>No GET data.</p>\\n \"\n\n; end ; _erbout.concat \"\\n\\n <h3 id=\\\"post-info\\\">POST</h3>\\n \"\n\n\n; unless req.POST.empty? ; _erbout.concat \"\\n <table class=\\\"req\\\">\\n <thead>\\n <tr>\\n <th>Variable</th>\\n <th>Value</th>\\n </tr>\\n </thead>\\n <tbody>\\n \"\n\n\n\n\n\n\n\n\n; req.POST.sort_by { |k, v| k.to_s }.each { |key, val| ; _erbout.concat \"\\n <tr>\\n <td>\"\n\n; _erbout.concat((h key ).to_s); _erbout.concat \"</td>\\n <td class=\\\"code\\\"><div>\"\n; _erbout.concat((h val.inspect ).to_s); _erbout.concat \"</div></td>\\n </tr>\\n \"\n\n; } ; _erbout.concat \"\\n </tbody>\\n </table>\\n \"\n\n\n; else ; _erbout.concat \"\\n <p>No POST data.</p>\\n \"\n\n; end ; _erbout.concat \"\\n\\n\\n <h3 id=\\\"cookie-info\\\">COOKIES</h3>\\n \"\n\n\n\n; unless req.cookies.empty? ; _erbout.concat \"\\n <table class=\\\"req\\\">\\n <thead>\\n <tr>\\n <th>Variable</th>\\n <th>Value</th>\\n </tr>\\n </thead>\\n <tbody>\\n \"\n\n\n\n\n\n\n\n\n; req.cookies.each { |key, val| ; _erbout.concat \"\\n <tr>\\n <td>\"\n\n; _erbout.concat((h key ).to_s); _erbout.concat \"</td>\\n <td class=\\\"code\\\"><div>\"\n; _erbout.concat((h val.inspect ).to_s); _erbout.concat \"</div></td>\\n </tr>\\n \"\n\n; } ; _erbout.concat \"\\n </tbody>\\n </table>\\n \"\n\n\n; else ; _erbout.concat \"\\n <p>No cookie data.</p>\\n \"\n\n; end ; _erbout.concat \"\\n\\n <h3 id=\\\"env-info\\\">Rack ENV</h3>\\n <table class=\\\"req\\\">\\n <thead>\\n <tr>\\n <th>Variable</th>\\n <th>Value</th>\\n </tr>\\n </thead>\\n <tbody>\\n \"\n\n\n\n\n\n\n\n\n\n\n; env.sort_by { |k, v| k.to_s }.each { |key, val| ; _erbout.concat \"\\n <tr>\\n <td>\"\n\n; _erbout.concat((h key ).to_s); _erbout.concat \"</td>\\n <td class=\\\"code\\\"><div>\"\n; _erbout.concat((h val ).to_s); _erbout.concat \"</div></td>\\n </tr>\\n \"\n\n; } ; _erbout.concat \"\\n </tbody>\\n </table>\\n\\n</div>\\n\\n<div id=\\\"explanation\\\">\\n <p>\\n You're seeing this error because you use <code>Rack::ShowExceptions</code>.\\n </p>\\n</div>\\n\\n</body>\\n</html>\\n\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n; _erbout.force_encoding(__ENCODING__)"Exception `Sinatra::NotFound' at /Users/gregg/.rvm/gems/ruby-1.9.2-p180/gems/sinatra-1.2.1/lib/sinatra/base.rb:757 - Sinatra::NotFound
+Exception `Errno::ENOTCONN' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/server.rb:134 - Socket is not connected
+Exception `Errno::EBADF' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/server.rb:90 - Bad file descriptor
+Exception `WEBrick::HTTPStatus::EOFError' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/httpserver.rb:55 - WEBrick::HTTPStatus::EOFError
+>>,
+ @logger=#<File:sinatra.log>>
+My::Application
+Using Ext extension for JSON.
+[2011-03-25 15:37:48] INFO WEBrick 1.3.1
+[2011-03-25 15:37:48] INFO ruby 1.9.2 (2011-02-18) [x86_64-darwin10.6.0]
+[2011-03-25 15:37:48] INFO WEBrick::HTTPServer#start: pid=20895 port=3000
+127.0.0.1 - - [25/Mar/2011 15:37:53] "GET /hello HTTP/1.1" 200 - 0.0212
+127.0.0.1 - - [25/Mar/2011 15:37:53] "GET /favicon.ico HTTP/1.1" 404 420 0.0007
+[2011-03-25 15:37:54] INFO going to shutdown ...
+[2011-03-25 15:37:54] INFO WEBrick::HTTPServer#start done.
+Exception `LoadError' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36 - no such file to load -- sinatra
+Exception `LoadError' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36 - no such file to load -- sinatra/linkeddata
+Exception `LoadError' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36 - no such file to load -- json/ext/1.9/parser
+Exception `LoadError' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:61 - no such file to load -- json/ext/1.9/parser
+Exception `LoadError' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36 - no such file to load -- sparql/client
+Exception `LoadError' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36 - no such file to load -- mongrel
+Exception `LoadError' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:61 - no such file to load -- mongrel
+Exception `LoadError' at /Users/gregg/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.2.2/lib/rack/handler.rb:37 - no such file to load -- mongrel
+#<Rack::CommonLogger:0x00000102915a98
+ @app=
+ #<Rack::ShowExceptions:0x00000102837068
+ @app=
+ #<Rack::Lint:0x000001028370b8 @app=My::Application, @content_length=nil>,
+ @template=
+ #<ERB:0x00000102837040
+ @enc=#<Encoding:US-ASCII>,
+ @filename=nil,
+ @safe_level=nil,
+ @src=
+ "#coding:US-ASCII\n_erbout = ''; _erbout.concat \"<!DOCTYPE HTML PUBLIC \\\"-//W3C//DTD HTML 4.01 Transitional//EN\\\" \\\"http://www.w3.org/TR/html4/loose.dtd\\\">\\n<html lang=\\\"en\\\">\\n<head>\\n <meta http-equiv=\\\"content-type\\\" content=\\\"text/html; charset=utf-8\\\" />\\n <meta name=\\\"robots\\\" content=\\\"NONE,NOARCHIVE\\\" />\\n <title>\"\n\n\n\n\n; _erbout.concat((h exception.class ).to_s); _erbout.concat \" at \"; _erbout.concat((h path ).to_s); _erbout.concat \"</title>\\n <style type=\\\"text/css\\\">\\n html * { padding:0; margin:0; }\\n body * { padding:10px 20px; }\\n body * * { padding:0; }\\n body { font:small sans-serif; }\\n body>div { border-bottom:1px solid #ddd; }\\n h1 { font-weight:normal; }\\n h2 { margin-bottom:.8em; }\\n h2 span { font-size:80%; color:#666; font-weight:normal; }\\n h3 { margin:1em 0 .5em 0; }\\n h4 { margin:0 0 .5em 0; font-weight: normal; }\\n table {\\n border:1px solid #ccc; border-collapse: collapse; background:white; }\\n tbody td, tbody th { vertical-align:top; padding:2px 3px; }\\n thead th {\\n padding:1px 6px 1px 3px; background:#fefefe; text-align:left;\\n font-weight:normal; font-size:11px; border:1px solid #ddd; }\\n tbody th { text-align:right; color:#666; padding-right:.5em; }\\n table.vars { margin:5px 0 2px 40px; }\\n table.vars td, table.req td { font-family:monospace; }\\n table td.code { width:100%;}\\n table td.code div { overflow:hidden; }\\n table.source th { color:#666; }\\n table.source td {\\n font-family:monospace; white-space:pre; border-bottom:1px solid #eee; }\\n ul.traceback { list-style-type:none; }\\n ul.traceback li.frame { margin-bottom:1em; }\\n div.context { margin: 10px 0; }\\n div.context ol {\\n padding-left:30px; margin:0 10px; list-style-position: inside; }\\n div.context ol li {\\n font-family:monospace; white-space:pre; color:#666; cursor:pointer; }\\n div.context ol.context-line li { color:black; background-color:#ccc; }\\n div.context ol.context-line li span { float: right; }\\n div.commands { margin-left: 40px; }\\n div.commands a { color:black; text-decoration:none; }\\n #summary { background: #ffc; }\\n #summary h2 { font-weight: normal; color: #666; }\\n #summary ul#quicklinks { list-style-type: none; margin-bottom: 2em; }\\n #summary ul#quicklinks li { float: left; padding: 0 1em; }\\n #summary ul#quicklinks>li+li { border-left: 1px #666 solid; }\\n #explanation { background:#eee; }\\n #template, #template-not-exist { background:#f6f6f6; }\\n #template-not-exist ul { margin: 0 0 0 20px; }\\n #traceback { background:#eee; }\\n #requestinfo { background:#f6f6f6; padding-left:120px; }\\n #summary table { border:none; background:transparent; }\\n #requestinfo h2, #requestinfo h3 { position:relative; margin-left:-100px; }\\n #requestinfo h3 { margin-bottom:-1em; }\\n .error { background: #ffc; }\\n .specific { color:#cc3300; font-weight:bold; }\\n </style>\\n <script type=\\\"text/javascript\\\">\\n //<!--\\n function getElementsByClassName(oElm, strTagName, strClassName){\\n // Written by Jonathan Snook, http://www.snook.ca/jon;\\n // Add-ons by Robert Nyman, http://www.robertnyman.com\\n var arrElements = (strTagName == \\\"*\\\" && document.all)? document.all :\\n oElm.getElementsByTagName(strTagName);\\n var arrReturnElements = new Array();\\n strClassName = strClassName.replace(/\\\\-/g, \\\"\\\\\\\\-\\\");\\n var oRegExp = new RegExp(\\\"(^|\\\\\\\\s)\\\" + strClassName + \\\"(\\\\\\\\s|$$)\\\");\\n var oElement;\\n for(var i=0; i<arrElements.length; i++){\\n oElement = arrElements[i];\\n if(oRegExp.test(oElement.className)){\\n arrReturnElements.push(oElement);\\n }\\n }\\n return (arrReturnElements)\\n }\\n function hideAll(elems) {\\n for (var e = 0; e < elems.length; e++) {\\n elems[e].style.display = 'none';\\n }\\n }\\n window.onload = function() {\\n hideAll(getElementsByClassName(document, 'table', 'vars'));\\n hideAll(getElementsByClassName(document, 'ol', 'pre-context'));\\n hideAll(getElementsByClassName(document, 'ol', 'post-context'));\\n }\\n function toggle() {\\n for (var i = 0; i < arguments.length; i++) {\\n var e = document.getElementById(arguments[i]);\\n if (e) {\\n e.style.display = e.style.display == 'none' ? 'block' : 'none';\\n }\\n }\\n return false;\\n }\\n function varToggle(link, id) {\\n toggle('v' + id);\\n var s = link.getElementsByTagName('span')[0];\\n var uarr = String.fromCharCode(0x25b6);\\n var darr = String.fromCharCode(0x25bc);\\n s.innerHTML = s.innerHTML == uarr ? darr : uarr;\\n return false;\\n }\\n //-->\\n </script>\\n</head>\\n<body>\\n\\n<div id=\\\"summary\\\">\\n <h1>\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n; _erbout.concat((h exception.class ).to_s); _erbout.concat \" at \"; _erbout.concat((h path ).to_s); _erbout.concat \"</h1>\\n <h2>\"\n; _erbout.concat((h exception.message ).to_s); _erbout.concat \"</h2>\\n <table><tr>\\n <th>Ruby</th>\\n <td><code>\"\n\n\n; _erbout.concat((h frames.first.filename ).to_s); _erbout.concat \"</code>: in <code>\"; _erbout.concat((h frames.first.function ).to_s); _erbout.concat \"</code>, line \"; _erbout.concat((h frames.first.lineno ).to_s); _erbout.concat \"</td>\\n </tr><tr>\\n <th>Web</th>\\n <td><code>\"\n\n\n; _erbout.concat((h req.request_method ).to_s); _erbout.concat \" \"; _erbout.concat((h(req.host + path)).to_s); _erbout.concat \"</code></td>\\n </tr></table>\\n\\n <h3>Jump to:</h3>\\n <ul id=\\\"quicklinks\\\">\\n <li><a href=\\\"#get-info\\\">GET</a></li>\\n <li><a href=\\\"#post-info\\\">POST</a></li>\\n <li><a href=\\\"#cookie-info\\\">Cookies</a></li>\\n <li><a href=\\\"#env-info\\\">ENV</a></li>\\n </ul>\\n</div>\\n\\n<div id=\\\"traceback\\\">\\n <h2>Traceback <span>(innermost first)</span></h2>\\n <ul class=\\\"traceback\\\">\\n\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n; frames.each { |frame| ; _erbout.concat \"\\n <li class=\\\"frame\\\">\\n <code>\"\n\n; _erbout.concat((h frame.filename ).to_s); _erbout.concat \"</code>: in <code>\"; _erbout.concat((h frame.function ).to_s); _erbout.concat \"</code>\\n\\n \"\n\n; if frame.context_line ; _erbout.concat \"\\n <div class=\\\"context\\\" id=\\\"c\"\n; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"\\\">\\n \"\n; if frame.pre_context ; _erbout.concat \"\\n <ol start=\\\"\"\n; _erbout.concat((h frame.pre_context_lineno+1 ).to_s); _erbout.concat \"\\\" class=\\\"pre-context\\\" id=\\\"pre\"; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"\\\">\\n \"\n; frame.pre_context.each { |line| ; _erbout.concat \"\\n <li onclick=\\\"toggle('pre\"\n; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"', 'post\"; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"')\\\">\"; _erbout.concat((h line ).to_s); _erbout.concat \"</li>\\n \"\n; } ; _erbout.concat \"\\n </ol>\\n \"\n\n; end ; _erbout.concat \"\\n\\n <ol start=\\\"\"\n\n; _erbout.concat((h frame.lineno ).to_s); _erbout.concat \"\\\" class=\\\"context-line\\\">\\n <li onclick=\\\"toggle('pre\"\n; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"', 'post\"; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"')\\\">\"; _erbout.concat((h frame.context_line ).to_s); _erbout.concat \"<span>...</span></li></ol>\\n\\n \"\n\n; if frame.post_context ; _erbout.concat \"\\n <ol start='\"\n; _erbout.concat((h frame.lineno+1 ).to_s); _erbout.concat \"' class=\\\"post-context\\\" id=\\\"post\"; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"\\\">\\n \"\n; frame.post_context.each { |line| ; _erbout.concat \"\\n <li onclick=\\\"toggle('pre\"\n; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"', 'post\"; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"')\\\">\"; _erbout.concat((h line ).to_s); _erbout.concat \"</li>\\n \"\n; } ; _erbout.concat \"\\n </ol>\\n \"\n\n; end ; _erbout.concat \"\\n </div>\\n \"\n\n; end ; _erbout.concat \"\\n </li>\\n\"\n\n; } ; _erbout.concat \"\\n </ul>\\n</div>\\n\\n<div id=\\\"requestinfo\\\">\\n <h2>Request information</h2>\\n\\n <h3 id=\\\"get-info\\\">GET</h3>\\n \"\n\n\n\n\n\n\n\n; unless req.GET.empty? ; _erbout.concat \"\\n <table class=\\\"req\\\">\\n <thead>\\n <tr>\\n <th>Variable</th>\\n <th>Value</th>\\n </tr>\\n </thead>\\n <tbody>\\n \"\n\n\n\n\n\n\n\n\n; req.GET.sort_by { |k, v| k.to_s }.each { |key, val| ; _erbout.concat \"\\n <tr>\\n <td>\"\n\n; _erbout.concat((h key ).to_s); _erbout.concat \"</td>\\n <td class=\\\"code\\\"><div>\"\n; _erbout.concat((h val.inspect ).to_s); _erbout.concat \"</div></td>\\n </tr>\\n \"\n\n; } ; _erbout.concat \"\\n </tbody>\\n </table>\\n \"\n\n\n; else ; _erbout.concat \"\\n <p>No GET data.</p>\\n \"\n\n; end ; _erbout.concat \"\\n\\n <h3 id=\\\"post-info\\\">POST</h3>\\n \"\n\n\n; unless req.POST.empty? ; _erbout.concat \"\\n <table class=\\\"req\\\">\\n <thead>\\n <tr>\\n <th>Variable</th>\\n <th>Value</th>\\n </tr>\\n </thead>\\n <tbody>\\n \"\n\n\n\n\n\n\n\n\n; req.POST.sort_by { |k, v| k.to_s }.each { |key, val| ; _erbout.concat \"\\n <tr>\\n <td>\"\n\n; _erbout.concat((h key ).to_s); _erbout.concat \"</td>\\n <td class=\\\"code\\\"><div>\"\n; _erbout.concat((h val.inspect ).to_s); _erbout.concat \"</div></td>\\n </tr>\\n \"\n\n; } ; _erbout.concat \"\\n </tbody>\\n </table>\\n \"\n\n\n; else ; _erbout.concat \"\\n <p>No POST data.</p>\\n \"\n\n; end ; _erbout.concat \"\\n\\n\\n <h3 id=\\\"cookie-info\\\">COOKIES</h3>\\n \"\n\n\n\n; unless req.cookies.empty? ; _erbout.concat \"\\n <table class=\\\"req\\\">\\n <thead>\\n <tr>\\n <th>Variable</th>\\n <th>Value</th>\\n </tr>\\n </thead>\\n <tbody>\\n \"\n\n\n\n\n\n\n\n\n; req.cookies.each { |key, val| ; _erbout.concat \"\\n <tr>\\n <td>\"\n\n; _erbout.concat((h key ).to_s); _erbout.concat \"</td>\\n <td class=\\\"code\\\"><div>\"\n; _erbout.concat((h val.inspect ).to_s); _erbout.concat \"</div></td>\\n </tr>\\n \"\n\n; } ; _erbout.concat \"\\n </tbody>\\n </table>\\n \"\n\n\n; else ; _erbout.concat \"\\n <p>No cookie data.</p>\\n \"\n\n; end ; _erbout.concat \"\\n\\n <h3 id=\\\"env-info\\\">Rack ENV</h3>\\n <table class=\\\"req\\\">\\n <thead>\\n <tr>\\n <th>Variable</th>\\n <th>Value</th>\\n </tr>\\n </thead>\\n <tbody>\\n \"\n\n\n\n\n\n\n\n\n\n\n; env.sort_by { |k, v| k.to_s }.each { |key, val| ; _erbout.concat \"\\n <tr>\\n <td>\"\n\n; _erbout.concat((h key ).to_s); _erbout.concat \"</td>\\n <td class=\\\"code\\\"><div>\"\n; _erbout.concat((h val ).to_s); _erbout.concat \"</div></td>\\n </tr>\\n \"\n\n; } ; _erbout.concat \"\\n </tbody>\\n </table>\\n\\n</div>\\n\\n<div id=\\\"explanation\\\">\\n <p>\\n You're seeing this error because you use <code>Rack::ShowExceptions</code>.\\n </p>\\n</div>\\n\\n</body>\\n</html>\\n\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n; _erbout.force_encoding(__ENCODING__)"Exception `Errno::ENOTCONN' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/server.rb:134 - Socket is not connected
+Exception `Errno::EBADF' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/server.rb:90 - Bad file descriptor
+>>,
+ @logger=#<File:sinatra.log>>
+My::Application
+Using Ext extension for JSON.
+[2011-03-25 15:38:10] INFO WEBrick 1.3.1
+[2011-03-25 15:38:10] INFO ruby 1.9.2 (2011-02-18) [x86_64-darwin10.6.0]
+[2011-03-25 15:38:10] INFO WEBrick::HTTPServer#start: pid=20897 port=3000
+[2011-03-25 15:38:11] INFO going to shutdown ...
+[2011-03-25 15:38:11] INFO WEBrick::HTTPServer#start done.
+Exception `LoadError' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36 - no such file to load -- sinatra
+Exception `LoadError' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36 - no such file to load -- sinatra/linkeddata
+Exception `LoadError' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36 - no such file to load -- json/ext/1.9/parser
+Exception `LoadError' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:61 - no such file to load -- json/ext/1.9/parser
+Exception `LoadError' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36 - no such file to load -- sparql/client
+Exception `LoadError' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36 - no such file to load -- mongrel
+Exception `LoadError' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:61 - no such file to load -- mongrel
+Exception `LoadError' at /Users/gregg/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.2.2/lib/rack/handler.rb:37 - no such file to load -- mongrel
+#<Rack::CommonLogger:0x00000102878838
+ @app=
+ #<Rack::ShowExceptions:0x00000101f8c6e8
+ @app=
+ #<Rack::Lint:0x00000101f8c710 @app=My::Application, @content_length=nil>,
+ @template=
+ #<ERB:0x00000101f8c6c0
+ @enc=#<Encoding:US-ASCII>,
+ @filename=nil,
+ @safe_level=nil,
+ @src=
+ "#coding:US-ASCII\n_erbout = ''; _erbout.concat \"<!DOCTYPE HTML PUBLIC \\\"-//W3C//DTD HTML 4.01 Transitional//EN\\\" \\\"http://www.w3.org/TR/html4/loose.dtd\\\">\\n<html lang=\\\"en\\\">\\n<head>\\n <meta http-equiv=\\\"content-type\\\" content=\\\"text/html; charset=utf-8\\\" />\\n <meta name=\\\"robots\\\" content=\\\"NONE,NOARCHIVE\\\" />\\n <title>\"\n\n\n\n\n; _erbout.concat((h exception.class ).to_s); _erbout.concat \" at \"; _erbout.concat((h path ).to_s); _erbout.concat \"</title>\\n <style type=\\\"text/css\\\">\\n html * { padding:0; margin:0; }\\n body * { padding:10px 20px; }\\n body * * { padding:0; }\\n body { font:small sans-serif; }\\n body>div { border-bottom:1px solid #ddd; }\\n h1 { font-weight:normal; }\\n h2 { margin-bottom:.8em; }\\n h2 span { font-size:80%; color:#666; font-weight:normal; }\\n h3 { margin:1em 0 .5em 0; }\\n h4 { margin:0 0 .5em 0; font-weight: normal; }\\n table {\\n border:1px solid #ccc; border-collapse: collapse; background:white; }\\n tbody td, tbody th { vertical-align:top; padding:2px 3px; }\\n thead th {\\n padding:1px 6px 1px 3px; background:#fefefe; text-align:left;\\n font-weight:normal; font-size:11px; border:1px solid #ddd; }\\n tbody th { text-align:right; color:#666; padding-right:.5em; }\\n table.vars { margin:5px 0 2px 40px; }\\n table.vars td, table.req td { font-family:monospace; }\\n table td.code { width:100%;}\\n table td.code div { overflow:hidden; }\\n table.source th { color:#666; }\\n table.source td {\\n font-family:monospace; white-space:pre; border-bottom:1px solid #eee; }\\n ul.traceback { list-style-type:none; }\\n ul.traceback li.frame { margin-bottom:1em; }\\n div.context { margin: 10px 0; }\\n div.context ol {\\n padding-left:30px; margin:0 10px; list-style-position: inside; }\\n div.context ol li {\\n font-family:monospace; white-space:pre; color:#666; cursor:pointer; }\\n div.context ol.context-line li { color:black; background-color:#ccc; }\\n div.context ol.context-line li span { float: right; }\\n div.commands { margin-left: 40px; }\\n div.commands a { color:black; text-decoration:none; }\\n #summary { background: #ffc; }\\n #summary h2 { font-weight: normal; color: #666; }\\n #summary ul#quicklinks { list-style-type: none; margin-bottom: 2em; }\\n #summary ul#quicklinks li { float: left; padding: 0 1em; }\\n #summary ul#quicklinks>li+li { border-left: 1px #666 solid; }\\n #explanation { background:#eee; }\\n #template, #template-not-exist { background:#f6f6f6; }\\n #template-not-exist ul { margin: 0 0 0 20px; }\\n #traceback { background:#eee; }\\n #requestinfo { background:#f6f6f6; padding-left:120px; }\\n #summary table { border:none; background:transparent; }\\n #requestinfo h2, #requestinfo h3 { position:relative; margin-left:-100px; }\\n #requestinfo h3 { margin-bottom:-1em; }\\n .error { background: #ffc; }\\n .specific { color:#cc3300; font-weight:bold; }\\n </style>\\n <script type=\\\"text/javascript\\\">\\n //<!--\\n function getElementsByClassName(oElm, strTagName, strClassName){\\n // Written by Jonathan Snook, http://www.snook.ca/jon;\\n // Add-ons by Robert Nyman, http://www.robertnyman.com\\n var arrElements = (strTagName == \\\"*\\\" && document.all)? document.all :\\n oElm.getElementsByTagName(strTagName);\\n var arrReturnElements = new Array();\\n strClassName = strClassName.replace(/\\\\-/g, \\\"\\\\\\\\-\\\");\\n var oRegExp = new RegExp(\\\"(^|\\\\\\\\s)\\\" + strClassName + \\\"(\\\\\\\\s|$$)\\\");\\n var oElement;\\n for(var i=0; i<arrElements.length; i++){\\n oElement = arrElements[i];\\n if(oRegExp.test(oElement.className)){\\n arrReturnElements.push(oElement);\\n }\\n }\\n return (arrReturnElements)\\n }\\n function hideAll(elems) {\\n for (var e = 0; e < elems.length; e++) {\\n elems[e].style.display = 'none';\\n }\\n }\\n window.onload = function() {\\n hideAll(getElementsByClassName(document, 'table', 'vars'));\\n hideAll(getElementsByClassName(document, 'ol', 'pre-context'));\\n hideAll(getElementsByClassName(document, 'ol', 'post-context'));\\n }\\n function toggle() {\\n for (var i = 0; i < arguments.length; i++) {\\n var e = document.getElementById(arguments[i]);\\n if (e) {\\n e.style.display = e.style.display == 'none' ? 'block' : 'none';\\n }\\n }\\n return false;\\n }\\n function varToggle(link, id) {\\n toggle('v' + id);\\n var s = link.getElementsByTagName('span')[0];\\n var uarr = String.fromCharCode(0x25b6);\\n var darr = String.fromCharCode(0x25bc);\\n s.innerHTML = s.innerHTML == uarr ? darr : uarr;\\n return false;\\n }\\n //-->\\n </script>\\n</head>\\n<body>\\n\\n<div id=\\\"summary\\\">\\n <h1>\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n; _erbout.concat((h exception.class ).to_s); _erbout.concat \" at \"; _erbout.concat((h path ).to_s); _erbout.concat \"</h1>\\n <h2>\"\n; _erbout.concat((h exception.message ).to_s); _erbout.concat \"</h2>\\n <table><tr>\\n <th>Ruby</th>\\n <td><code>\"\n\n\n; _erbout.concat((h frames.first.filename ).to_s); _erbout.concat \"</code>: in <code>\"; _erbout.concat((h frames.first.function ).to_s); _erbout.concat \"</code>, line \"; _erbout.concat((h frames.first.lineno ).to_s); _erbout.concat \"</td>\\n </tr><tr>\\n <th>Web</th>\\n <td><code>\"\n\n\n; _erbout.concat((h req.request_method ).to_s); _erbout.concat \" \"; _erbout.concat((h(req.host + path)).to_s); _erbout.concat \"</code></td>\\n </tr></table>\\n\\n <h3>Jump to:</h3>\\n <ul id=\\\"quicklinks\\\">\\n <li><a href=\\\"#get-info\\\">GET</a></li>\\n <li><a href=\\\"#post-info\\\">POST</a></li>\\n <li><a href=\\\"#cookie-info\\\">Cookies</a></li>\\n <li><a href=\\\"#env-info\\\">ENV</a></li>\\n </ul>\\n</div>\\n\\n<div id=\\\"traceback\\\">\\n <h2>Traceback <span>(innermost first)</span></h2>\\n <ul class=\\\"traceback\\\">\\n\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n; frames.each { |frame| ; _erbout.concat \"\\n <li class=\\\"frame\\\">\\n <code>\"\n\n; _erbout.concat((h frame.filename ).to_s); _erbout.concat \"</code>: in <code>\"; _erbout.concat((h frame.function ).to_s); _erbout.concat \"</code>\\n\\n \"\n\n; if frame.context_line ; _erbout.concat \"\\n <div class=\\\"context\\\" id=\\\"c\"\n; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"\\\">\\n \"\n; if frame.pre_context ; _erbout.concat \"\\n <ol start=\\\"\"\n; _erbout.concat((h frame.pre_context_lineno+1 ).to_s); _erbout.concat \"\\\" class=\\\"pre-context\\\" id=\\\"pre\"; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"\\\">\\n \"\n; frame.pre_context.each { |line| ; _erbout.concat \"\\n <li onclick=\\\"toggle('pre\"\n; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"', 'post\"; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"')\\\">\"; _erbout.concat((h line ).to_s); _erbout.concat \"</li>\\n \"\n; } ; _erbout.concat \"\\n </ol>\\n \"\n\n; end ; _erbout.concat \"\\n\\n <ol start=\\\"\"\n\n; _erbout.concat((h frame.lineno ).to_s); _erbout.concat \"\\\" class=\\\"context-line\\\">\\n <li onclick=\\\"toggle('pre\"\n; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"', 'post\"; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"')\\\">\"; _erbout.concat((h frame.context_line ).to_s); _erbout.concat \"<span>...</span></li></ol>\\n\\n \"\n\n; if frame.post_context ; _erbout.concat \"\\n <ol start='\"\n; _erbout.concat((h frame.lineno+1 ).to_s); _erbout.concat \"' class=\\\"post-context\\\" id=\\\"post\"; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"\\\">\\n \"\n; frame.post_context.each { |line| ; _erbout.concat \"\\n <li onclick=\\\"toggle('pre\"\n; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"', 'post\"; _erbout.concat((h frame.object_id ).to_s); _erbout.concat \"')\\\">\"; _erbout.concat((h line ).to_s); _erbout.concat \"</li>\\n \"\n; } ; _erbout.concat \"\\n </ol>\\n \"\n\n; end ; _erbout.concat \"\\n </div>\\n \"\n\n; end ; _erbout.concat \"\\n </li>\\n\"\n\n; } ; _erbout.concat \"\\n </ul>\\n</div>\\n\\n<div id=\\\"requestinfo\\\">\\n <h2>Request information</h2>\\n\\n <h3 id=\\\"get-info\\\">GET</h3>\\n \"\n\n\n\n\n\n\n\n; unless req.GET.empty? ; _erbout.concat \"\\n <table class=\\\"req\\\">\\n <thead>\\n <tr>\\n <th>Variable</th>\\n <th>Value</th>\\n </tr>\\n </thead>\\n <tbody>\\n \"\n\n\n\n\n\n\n\n\n; req.GET.sort_by { |k, v| k.to_s }.each { |key, val| ; _erbout.concat \"\\n <tr>\\n <td>\"\n\n; _erbout.concat((h key ).to_s); _erbout.concat \"</td>\\n <td class=\\\"code\\\"><div>\"\n; _erbout.concat((h val.inspect ).to_s); _erbout.concat \"</div></td>\\n </tr>\\n \"\n\n; } ; _erbout.concat \"\\n </tbody>\\n </table>\\n \"\n\n\n; else ; _erbout.concat \"\\n <p>No GET data.</p>\\n \"\n\n; end ; _erbout.concat \"\\n\\n <h3 id=\\\"post-info\\\">POST</h3>\\n \"\n\n\n; unless req.POST.empty? ; _erbout.concat \"\\n <table class=\\\"req\\\">\\n <thead>\\n <tr>\\n <th>Variable</th>\\n <th>Value</th>\\n </tr>\\n </thead>\\n <tbody>\\n \"\n\n\n\n\n\n\n\n\n; req.POST.sort_by { |k, v| k.to_s }.each { |key, val| ; _erbout.concat \"\\n <tr>\\n <td>\"\n\n; _erbout.concat((h key ).to_s); _erbout.concat \"</td>\\n <td class=\\\"code\\\"><div>\"\n; _erbout.concat((h val.inspect ).to_s); _erbout.concat \"</div></td>\\n </tr>\\n \"\n\n; } ; _erbout.concat \"\\n </tbody>\\n </table>\\n \"\n\n\n; else ; _erbout.concat \"\\n <p>No POST data.</p>\\n \"\n\n; end ; _erbout.concat \"\\n\\n\\n <h3 id=\\\"cookie-info\\\">COOKIES</h3>\\n \"\n\n\n\n; unless req.cookies.empty? ; _erbout.concat \"\\n <table class=\\\"req\\\">\\n <thead>\\n <tr>\\n <th>Variable</th>\\n <th>Value</th>\\n </tr>\\n </thead>\\n <tbody>\\n \"\n\n\n\n\n\n\n\n\n; req.cookies.each { |key, val| ; _erbout.concat \"\\n <tr>\\n <td>\"\n\n; _erbout.concat((h key ).to_s); _erbout.concat \"</td>\\n <td class=\\\"code\\\"><div>\"\n; _erbout.concat((h val.inspect ).to_s); _erbout.concat \"</div></td>\\n </tr>\\n \"\n\n; } ; _erbout.concat \"\\n </tbody>\\n </table>\\n \"\n\n\n; else ; _erbout.concat \"\\n <p>No cookie data.</p>\\n \"\n\n; end ; _erbout.concat \"\\n\\n <h3 id=\\\"env-info\\\">Rack ENV</h3>\\n <table class=\\\"req\\\">\\n <thead>\\n <tr>\\n <th>Variable</th>\\n <th>Value</th>\\n </tr>\\n </thead>\\n <tbody>\\n \"\n\n\n\n\n\n\n\n\n\n\n; env.sort_by { |k, v| k.to_s }.each { |key, val| ; _erbout.concat \"\\n <tr>\\n <td>\"\n\n; _erbout.concat((h key ).to_s); _erbout.concat \"</td>\\n <td class=\\\"code\\\"><div>\"\n; _erbout.concat((h val ).to_s); _erbout.concat \"</div></td>\\n </tr>\\n \"\n\n; } ; _erbout.concat \"\\n </tbody>\\n </table>\\n\\n</div>\\n\\n<div id=\\\"explanation\\\">\\n <p>\\n You're seeing this error because you use <code>Rack::ShowExceptions</code>.\\n </p>\\n</div>\\n\\n</body>\\n</html>\\n\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n; _erbout.force_encoding(__ENCODING__)"Exception `Errno::ENOTCONN' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/server.rb:134 - Socket is not connected
+Exception `Errno::EBADF' at /Users/gregg/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/server.rb:90 - Bad file descriptor
+>>,
+ @logger=#<File:sinatra.log>>
+My::Application
+Using Ext extension for JSON.
+[2011-03-25 15:38:17] INFO WEBrick 1.3.1
+[2011-03-25 15:38:17] INFO ruby 1.9.2 (2011-02-18) [x86_64-darwin10.6.0]
+[2011-03-25 15:38:17] INFO WEBrick::HTTPServer#start: pid=20898 port=3000
+[2011-03-25 15:38:18] INFO going to shutdown ...
+[2011-03-25 15:38:18] INFO WEBrick::HTTPServer#start done.
Please sign in to comment.
Something went wrong with that request. Please try again.