Skip to content

Instantly share code, notes, and snippets.

@Jimgerneer
Created May 25, 2012 20:13
Show Gist options
  • Save Jimgerneer/2790323 to your computer and use it in GitHub Desktop.
Save Jimgerneer/2790323 to your computer and use it in GitHub Desktop.
Boot Error
BACKTRACE
(expand)
JUMP TO: GET POST COOKIES ENV
/Users/Inkpen1986/Fountain/Ruby/Rook/views/index.haml in evaluate_source
= will_paginate @opportunites
/Users/Inkpen1986/Fountain/Ruby/Rook/routes/opportunity.rb in block in <class:Rook>
haml :index
GET
No GET data.
POST
No POST data.
COOKIES
No cookie data.
Rack ENV
Variable Value
GATEWAY_INTERFACE
CGI/1.2
HTTP_ACCEPT
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_ACCEPT_CHARSET
ISO-8859-1,utf-8;q=0.7,*;q=0.3
HTTP_ACCEPT_ENCODING
gzip,deflate,sdch
HTTP_ACCEPT_LANGUAGE
en-US,en;q=0.8
HTTP_CACHE_CONTROL
max-age=0
HTTP_CONNECTION
keep-alive
HTTP_HOST
127.0.0.1:9393
HTTP_USER_AGENT
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.52 Safari/536.5
HTTP_VERSION
HTTP/1.1
PATH_INFO
/
QUERY_STRING
REMOTE_ADDR
127.0.0.1
REQUEST_METHOD
GET
REQUEST_PATH
/
REQUEST_URI
/
SCRIPT_NAME
SERVER_NAME
127.0.0.1
SERVER_PORT
9393
SERVER_PROTOCOL
HTTP/1.1
SERVER_SOFTWARE
thin 1.3.1 codename Triple Espresso
async.callback
#<Method: Thin::Connection#post_process>
async.close
#<EventMachine::DefaultDeferrable:0x007f93451a35f8>
rack.errors
#<Object:0x007f934502a5a0>
rack.input
#<Rack::Lint::InputWrapper:0x007f9344432ef0 @input=#<StringIO:0x007f93451a5060>>
rack.logger
#<Rack::NullLogger:0x007f93443857f0 @app=#<Rack::Protection::FrameOptions:0x007f9344385958 @app=#<Rack::Protection::IPSpoofing:0x007f93443859f8 @app=#<Rack::Protection::JsonCsrf:0x007f9344385ae8 @app=#<Rack::Protection::PathTraversal:0x007f9344385b88 @app=#<Rack::Protection::XSSHeader:0x007f9344385c78 @app=#<Rook:0x007f93444dbfa0 @default_layout=:layout, @app=nil, @template_cache=#<Tilt::Cache:0x007f93444dbf78 @cache={[:haml, :index, {:outvar=>"@_out_buf", :default_encoding=>"utf-8"}]=>#<Tilt::HamlTemplate:0x007f934443f650 @options={:outvar=>"@_out_buf"}, @line=1, @file="/Users/Inkpen1986/Fountain/Ruby/Rook/views/index.haml", @compiled_method={}, @default_encoding="utf-8", @reader=#<Proc:0x007f934443f510@/Users/Inkpen1986/Developer/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/tilt-1.3.3/lib/tilt/template.rb:67 (lambda)>, @data="%h2 Welcome to Rook\n%a(href=\"opportunity\")\n %li Create\n%table Opportunities\n= will_paginate @opportunites\n", @engine=#<Haml::Engine:0x007f934443f420 @options={:suppress_eval=>false, :attr_wrapper=>"'", :autoclose=>["meta", "img", "link", "br", "hr", "input", "area", "param", "col", "base"], :preserve=>["textarea", "pre", "code"], :filename=>"/Users/Inkpen1986/Fountain/Ruby/Rook/views/index.haml", :line=>1, :ugly=>false, :format=>:xhtml, :escape_html=>false, :escape_attrs=>true, :encoding=>"ASCII-8BIT", :outvar=>"@_out_buf"}, @index=6, @template=[], @template_index=7, @to_close_stack=[], @output_tabs=0, @template_tabs=0, @flat=false, @newlines=0, @precompiled="_hamlout.push_text(\"<h2>Welcome to Rook</h2>\\n<a href='opportunity'>\\n <li>Create</li>\\n</a>\\n<table>Opportunities</table>\\n\#{\n\n\n\n_hamlout.format_script_false_false_false_false_false_true_false(( will_paginate @opportunites\n));}\\n\", 0, false);", @to_merge=[], @tab_change=0, @parent=(root nil (tag {:name=>"h2", :attributes=>{}, :attributes_hashes=>[], :self_closing=>false, :nuke_inner_whitespace=>false, :nuke_outer_whitespace=>false, :object_ref=>"nil", :escape_html=>false, :preserve_tag=>false, :preserve_script=>nil, :parse=>nil, :value=>"Welcome to Rook"}) (tag {:name=>"a", :attributes=>{"href"=>"opportunity"}, :attributes_hashes=>[], :self_closing=>false, :nuke_inner_whitespace=>false, :nuke_outer_whitespace=>false, :object_ref=>"nil", :escape_html=>false, :preserve_tag=>false, :preserve_script=>nil, :parse=>nil, :value=>nil} (tag {:name=>"li", :attributes=>{}, :attributes_hashes=>[], :self_closing=>false, :nuke_inner_whitespace=>false, :nuke_outer_whitespace=>false, :object_ref=>"nil", :escape_html=>false, :preserve_tag=>false, :preserve_script=>nil, :parse=>nil, :value=>"Create"})) (tag {:name=>"table", :attributes=>{}, :attributes_hashes=>[], :self_closing=>false, :nuke_inner_whitespace=>false, :nuke_outer_whitespace=>false, :object_ref=>"nil", :escape_html=>false, :preserve_tag=>false, :preserve_script=>nil, :parse=>nil, :value=>"Opportunities"}) (script {:text=>" will_paginate @opportunites", :escape_html=>false, :preserve=>false}) (haml_comment {:text=>""})), @root=(root nil (tag {:name=>"h2", :attributes=>{}, :attributes_hashes=>[], :self_closing=>false, :nuke_inner_whitespace=>false, :nuke_outer_whitespace=>false, :object_ref=>"nil", :escape_html=>false, :preserve_tag=>false, :preserve_script=>nil, :parse=>nil, :value=>"Welcome to Rook"}) (tag {:name=>"a", :attributes=>{"href"=>"opportunity"}, :attributes_hashes=>[], :self_closing=>false, :nuke_inner_whitespace=>false, :nuke_outer_whitespace=>false, :object_ref=>"nil", :escape_html=>false, :preserve_tag=>false, :preserve_script=>nil, :parse=>nil, :value=>nil} (tag {:name=>"li", :attributes=>{}, :attributes_hashes=>[], :self_closing=>false, :nuke_inner_whitespace=>false, :nuke_outer_whitespace=>false, :object_ref=>"nil", :escape_html=>false, :preserve_tag=>false, :preserve_script=>nil, :parse=>nil, :value=>"Create"})) (tag {:name=>"table", :attributes=>{}, :attributes_hashes=>[], :self_closing=>false, :nuke_inner_whitespace=>false, :nuke_outer_whitespace=>false, :object_ref=>"nil", :escape_html=>false, :preserve_tag=>false, :preserve_script=>nil, :parse=>nil, :value=>"Opportunities"}) (script {:text=>" will_paginate @opportunites", :escape_html=>false, :preserve=>false}) (haml_comment {:text=>""})), @haml_comment=false, @indentation=nil, @next_line=#<struct Haml::Parser::Line text="-#", unstripped="-#", full="-#", index=6, compiler=#<Haml::Engine:0x007f934443f420 ...>, eod=true>, @line=#<struct Haml::Parser::Line text="-#", unstripped="-#", full="-#", index=6, compiler=#<Haml::Engine:0x007f934443f420 ...>, eod=true>, @tab_up=nil, @node=nil, @dont_tab_up_next_text=false, @dont_indent_next_line=false, @output_line=6>>}>>, @options={:reaction=>:default_reaction, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :xss_mode=>:block, :except=>[:session_hijacking, :remote_token]}>, @options={:reaction=>:default_reaction, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :except=>[:session_hijacking, :remote_token]}>, @options={:reaction=>:default_reaction, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :except=>[:session_hijacking, :remote_token]}>, @options={:reaction=>:default_reaction, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :except=>[:session_hijacking, :remote_token]}>, @options={:reaction=>:default_reaction, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :xss_mode=>:block, :frame_options=>:sameorigin, :except=>[:session_hijacking, :remote_token]}>>
rack.multiprocess
false
rack.multithread
false
rack.request.cookie_hash
{}
rack.request.query_hash
{}
rack.request.query_string
rack.run_once
false
rack.url_scheme
http
rack.version
[1, 0]
sinatra.error
#<NoMethodError: undefined method `will_paginate' for #<Rook:0x007f9344432860>>
You're seeing this error because you have enabled the show_exceptions setting.
1 require 'sinatra'¬
2 require 'data_mapper'¬
3 require 'haml'¬
4 require 'will_paginate'¬
5 require 'will_paginate/data_mapper'¬
6 require 'will_paginate/view_helpers/sinatra'¬
7 ¬
8 require_relative 'routes/init'¬
9 require_relative 'models/init'¬
10 ¬
11 DataMapper.setup(:default, 'mysql://root@localhost/rook')¬
12 ¬
13 class Rook < Sinatra::Base¬
14 ¬
15 configure do¬
16 set :app_file, __FILE__¬
17 end¬
18 end¬
19 ¬
20 #class Rook::Subscription¬
21 # include DataMapper::Resource¬
22 #end¬
1 require 'pry'¬
2 require 'will_paginate'¬
3 ¬
4 class Rook < Sinatra::Base¬
5 get '/' do¬
6 @opportunites = Rook::Opportunity.paginate(:page => params[:page], :per_page => 10)¬
7 # @opportunites = paginate(Rook::Opportunity)¬
8 ¬
9 haml :index¬
10 end¬
11 ¬
12 get '/opportunity' do¬
13 haml :opportunity¬
14 end¬
15 ¬
16 post '/opportunity' do¬
17 @opportunity = Rook::Opportunity.create(params[:opportunity])¬
18 #:title => params[:title],¬
19 #:skills => params[:skills],¬
20 #:description => params[:description]¬
21 #)¬
22 redirect "/"¬
23 ¬
24 #haml :opportunity¬
25 end·¬
26 end¬
1 %h2 Welcome to Rook¬
2 %a(href="opportunity")¬
3 %li Create¬
4 %table Opportunities¬
5 = will_paginate @opportunites¬
~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment