Created
January 16, 2011 00:05
-
-
Save mwilc0x/781395 to your computer and use it in GitHub Desktop.
trying to install gollum wiki app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
####command line errors##### | |
C:\Ruby187\lib\ruby\gems\1.8\gems\gollum-1.1.1>gollum | |
== Sinatra/1.1.2 has taken the stage on 4567 for development with backup from WEBrick | |
[2011-01-15 19:02:58] INFO WEBrick 1.3.1 | |
[2011-01-15 19:02:58] INFO ruby 1.8.7 (2010-12-23) [i386-mingw32] | |
[2011-01-15 19:02:58] INFO WEBrick::HTTPServer#start: pid=4396 port=4567 | |
Grit::InvalidGitRepositoryError - C:/Ruby187/lib/ruby/gems/1.8/gems/gollum-1.1.1: | |
C:/Ruby187/lib/ruby/gems/1.8/gems/grit-2.4.1/lib/grit/repo.rb:51:in `initialize' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/gollum-1.1.1/bin/../lib/gollum/wiki.rb:62:in `new' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/gollum-1.1.1/bin/../lib/gollum/wiki.rb:62:in `initialize' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/gollum-1.1.1/bin/../lib/gollum/frontend/app.rb:145:in `new' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/gollum-1.1.1/bin/../lib/gollum/frontend/app.rb:145:in `show_page_or_file' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/gollum-1.1.1/bin/../lib/gollum/frontend/app.rb:141:in `GET /*' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:1057:in `call' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:1057:in `compile!' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:643:in `instance_eval' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:643:in `route_eval' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:627:in `route!' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:675:in `process_route' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:672:in `catch' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:672:in `process_route' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:626:in `route!' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:625:in `each' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:625:in `route!' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:760:in `dispatch!' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:553:in `call!' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:725:in `instance_eval' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:725:in `invoke' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:725:in `catch' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:725:in `invoke' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:553:in `call!' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:538:in `call' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/showexceptions.rb:24:in `call' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:1167:in `call' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:1193:in `synchronize' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:1167:in `call' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/content_length.rb:13:in `call' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/handler/webrick.rb:52:in `service' | |
C:/Ruby187/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' | |
C:/Ruby187/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' | |
C:/Ruby187/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' | |
C:/Ruby187/lib/ruby/1.8/webrick/server.rb:162:in `start' | |
C:/Ruby187/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' | |
C:/Ruby187/lib/ruby/1.8/webrick/server.rb:95:in `start' | |
C:/Ruby187/lib/ruby/1.8/webrick/server.rb:92:in `each' | |
C:/Ruby187/lib/ruby/1.8/webrick/server.rb:92:in `start' | |
C:/Ruby187/lib/ruby/1.8/webrick/server.rb:23:in `start' | |
C:/Ruby187/lib/ruby/1.8/webrick/server.rb:82:in `start' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/handler/webrick.rb:13:in `run' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:1138:in `run!' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/gollum-1.1.1/bin/gollum:102 | |
C:/Ruby187/bin/gollum:19:in `load' | |
C:/Ruby187/bin/gollum:19 | |
Grit::InvalidGitRepositoryError: C:/Ruby187/lib/ruby/gems/1.8/gems/gollum-1.1.1 | |
C:/Ruby187/lib/ruby/gems/1.8/gems/grit-2.4.1/lib/grit/repo.rb:51:in `initialize' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/gollum-1.1.1/bin/../lib/gollum/wiki.rb:62:in `new' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/gollum-1.1.1/bin/../lib/gollum/wiki.rb:62:in `initialize' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/gollum-1.1.1/bin/../lib/gollum/frontend/app.rb:145:in `new' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/gollum-1.1.1/bin/../lib/gollum/frontend/app.rb:145:in `show_page_or_file' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/gollum-1.1.1/bin/../lib/gollum/frontend/app.rb:141:in `GET /*' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:1057:in `call' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:1057:in `compile!' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:643:in `instance_eval' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:643:in `route_eval' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:627:in `route!' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:675:in `process_route' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:672:in `catch' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:672:in `process_route' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:626:in `route!' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:625:in `each' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:625:in `route!' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:760:in `dispatch!' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:553:in `call!' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:725:in `instance_eval' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:725:in `invoke' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:725:in `catch' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:725:in `invoke' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:553:in `call!' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:538:in `call' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/showexceptions.rb:24:in `call' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:1167:in `call' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:1193:in `synchronize' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:1167:in `call' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/content_length.rb:13:in `call' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/handler/webrick.rb:52:in `service' | |
C:/Ruby187/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' | |
C:/Ruby187/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' | |
C:/Ruby187/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' | |
C:/Ruby187/lib/ruby/1.8/webrick/server.rb:162:in `start' | |
C:/Ruby187/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' | |
C:/Ruby187/lib/ruby/1.8/webrick/server.rb:95:in `start' | |
C:/Ruby187/lib/ruby/1.8/webrick/server.rb:92:in `each' | |
C:/Ruby187/lib/ruby/1.8/webrick/server.rb:92:in `start' | |
C:/Ruby187/lib/ruby/1.8/webrick/server.rb:23:in `start' | |
C:/Ruby187/lib/ruby/1.8/webrick/server.rb:82:in `start' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/handler/webrick.rb:13:in `run' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb:1138:in `run!' | |
C:/Ruby187/lib/ruby/gems/1.8/gems/gollum-1.1.1/bin/gollum:102 | |
C:/Ruby187/bin/gollum:19:in `load' | |
C:/Ruby187/bin/gollum:19 | |
mikeLaptop - - [15/Jan/2011:19:03:08 Eastern Standard Time] "GET /favicon.ico HTTP/1.1" 500 125791 | |
- -> /favicon.ico | |
#####errors @ http://localhost:4567/#env-info ############ | |
* C:/Ruby187/lib/ruby/gems/1.8/gems/grit-2.4.1/lib/grit/repo.rb in initialize | |
* | |
44. self.working_dir = epath | |
45. self.path = File.join(epath, '.git') | |
46. @bare = false | |
47. elsif File.exist?(epath) && (epath =~ /\.git$/ || options[:is_bare]) | |
48. self.path = epath | |
49. @bare = true | |
50. elsif File.exist?(epath) | |
51. raise InvalidGitRepositoryError.new(epath) | |
52. else | |
53. raise NoSuchPathError.new(epath) | |
54. end | |
55. | |
56. self.git = Git.new(self.path) | |
57. end | |
58. | |
* C:/Ruby187/lib/ruby/gems/1.8/gems/gollum-1.1.1/bin/../lib/gollum/wiki.rb in new | |
* | |
55. # Default: "/" | |
56. # :page_class - The page Class. Default: Gollum::Page | |
57. # :file_class - The file Class. Default: Gollum::File | |
58. # | |
59. # Returns a fresh Gollum::Repo. | |
60. def initialize(path, options = {}) | |
61. @path = path | |
62. @repo = Grit::Repo.new(path) | |
63. @base_path = options[:base_path] || "/" | |
64. @page_class = options[:page_class] || self.class.page_class | |
65. @file_class = options[:file_class] || self.class.file_class | |
66. clear_cache | |
67. end | |
68. | |
69. # Public: check whether the wiki's git repo exists on the filesystem. | |
* C:/Ruby187/lib/ruby/gems/1.8/gems/gollum-1.1.1/bin/../lib/gollum/wiki.rb in initialize | |
* | |
55. # Default: "/" | |
56. # :page_class - The page Class. Default: Gollum::Page | |
57. # :file_class - The file Class. Default: Gollum::File | |
58. # | |
59. # Returns a fresh Gollum::Repo. | |
60. def initialize(path, options = {}) | |
61. @path = path | |
62. @repo = Grit::Repo.new(path) | |
63. @base_path = options[:base_path] || "/" | |
64. @page_class = options[:page_class] || self.class.page_class | |
65. @file_class = options[:file_class] || self.class.file_class | |
66. clear_cache | |
67. end | |
68. | |
69. # Public: check whether the wiki's git repo exists on the filesystem. | |
* C:/Ruby187/lib/ruby/gems/1.8/gems/gollum-1.1.1/bin/../lib/gollum/frontend/app.rb in new | |
* | |
138. end | |
139. | |
140. get '/*' do | |
141. show_page_or_file(params[:splat].first) | |
142. end | |
143. | |
144. def show_page_or_file(name) | |
145. wiki = Gollum::Wiki.new(settings.gollum_path) | |
146. if page = wiki.page(name) | |
147. @page = page | |
148. @name = name | |
149. @content = page.formatted_data | |
150. mustache :page | |
151. elsif file = wiki.file(name) | |
152. content_type file.mime_type | |
* C:/Ruby187/lib/ruby/gems/1.8/gems/gollum-1.1.1/bin/../lib/gollum/frontend/app.rb in show_page_or_file | |
* | |
138. end | |
139. | |
140. get '/*' do | |
141. show_page_or_file(params[:splat].first) | |
142. end | |
143. | |
144. def show_page_or_file(name) | |
145. wiki = Gollum::Wiki.new(settings.gollum_path) | |
146. if page = wiki.page(name) | |
147. @page = page | |
148. @name = name | |
149. @content = page.formatted_data | |
150. mustache :page | |
151. elsif file = wiki.file(name) | |
152. content_type file.mime_type | |
* C:/Ruby187/lib/ruby/gems/1.8/gems/gollum-1.1.1/bin/../lib/gollum/frontend/app.rb in GET / | |
* | |
33. set :raise_errors, false | |
34. set :show_exceptions, true | |
35. set :dump_errors, true | |
36. set :clean_trace, false | |
37. end | |
38. | |
39. get '/' do | |
40. show_page_or_file('Home') | |
41. end | |
42. | |
43. get '/edit/*' do | |
44. @name = params[:splat].first | |
45. wiki = Gollum::Wiki.new(settings.gollum_path) | |
46. if page = wiki.page(@name) | |
47. @page = page | |
* C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb in call | |
* | |
1050. define_method(method_name, &block) | |
1051. unbound_method = instance_method method_name | |
1052. pattern, keys = compile(path) | |
1053. conditions, @conditions = @conditions, [] | |
1054. remove_method method_name | |
1055. | |
1056. [ block.arity != 0 ? | |
1057. proc { unbound_method.bind(self).call(*@block_params) } : | |
1058. proc { unbound_method.bind(self).call }, | |
1059. pattern, keys, conditions ] | |
1060. end | |
1061. | |
1062. def compile(path) | |
1063. keys = [] | |
1064. if path.respond_to? :to_str | |
* C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb in compile! | |
* | |
1050. define_method(method_name, &block) | |
1051. unbound_method = instance_method method_name | |
1052. pattern, keys = compile(path) | |
1053. conditions, @conditions = @conditions, [] | |
1054. remove_method method_name | |
1055. | |
1056. [ block.arity != 0 ? | |
1057. proc { unbound_method.bind(self).call(*@block_params) } : | |
1058. proc { unbound_method.bind(self).call }, | |
1059. pattern, keys, conditions ] | |
1060. end | |
1061. | |
1062. def compile(path) | |
1063. keys = [] | |
1064. if path.respond_to? :to_str | |
* C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb in instance_eval | |
* | |
636. | |
637. route_eval(&pass_block) if pass_block | |
638. route_missing | |
639. end | |
640. | |
641. # Run a route block and throw :halt with the result. | |
642. def route_eval(&block) | |
643. throw :halt, instance_eval(&block) | |
644. end | |
645. | |
646. # If the current request matches pattern and conditions, fill params | |
647. # with keys and call the given block. | |
648. # Revert params afterwards. | |
649. # | |
650. # Returns pass block. | |
* C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb in route_eval | |
* | |
636. | |
637. route_eval(&pass_block) if pass_block | |
638. route_missing | |
639. end | |
640. | |
641. # Run a route block and throw :halt with the result. | |
642. def route_eval(&block) | |
643. throw :halt, instance_eval(&block) | |
644. end | |
645. | |
646. # If the current request matches pattern and conditions, fill params | |
647. # with keys and call the given block. | |
648. # Revert params afterwards. | |
649. # | |
650. # Returns pass block. | |
* C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb in route! | |
* | |
620. end | |
621. | |
622. # Run routes defined on the class and all superclasses. | |
623. def route!(base=self.class, pass_block=nil) | |
624. if routes = base.routes[@request.request_method] | |
625. routes.each do |pattern, keys, conditions, block| | |
626. pass_block = process_route(pattern, keys, conditions) do | |
627. route_eval(&block) | |
628. end | |
629. end | |
630. end | |
631. | |
632. # Run routes defined in superclass. | |
633. if base.superclass.respond_to?(:routes) | |
634. return route!(base.superclass, pass_block) | |
* C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb in process_route | |
* | |
668. {} | |
669. end | |
670. @params = @original_params.merge(params) | |
671. @block_params = values | |
672. catch(:pass) do | |
673. conditions.each { |cond| | |
674. throw :pass if instance_eval(&cond) == false } | |
675. yield | |
676. end | |
677. end | |
678. ensure | |
679. @params = @original_params | |
680. end | |
681. | |
682. # No matching route was found or all routes passed. The default | |
* C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb in catch | |
* | |
665. elsif values.any? | |
666. {'captures' => values} | |
667. else | |
668. {} | |
669. end | |
670. @params = @original_params.merge(params) | |
671. @block_params = values | |
672. catch(:pass) do | |
673. conditions.each { |cond| | |
674. throw :pass if instance_eval(&cond) == false } | |
675. yield | |
676. end | |
677. end | |
678. ensure | |
679. @params = @original_params | |
* C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb in process_route | |
* | |
665. elsif values.any? | |
666. {'captures' => values} | |
667. else | |
668. {} | |
669. end | |
670. @params = @original_params.merge(params) | |
671. @block_params = values | |
672. catch(:pass) do | |
673. conditions.each { |cond| | |
674. throw :pass if instance_eval(&cond) == false } | |
675. yield | |
676. end | |
677. end | |
678. ensure | |
679. @params = @original_params | |
* C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb in route! | |
* | |
619. base.filters[type].each { |block| instance_eval(&block) } | |
620. end | |
621. | |
622. # Run routes defined on the class and all superclasses. | |
623. def route!(base=self.class, pass_block=nil) | |
624. if routes = base.routes[@request.request_method] | |
625. routes.each do |pattern, keys, conditions, block| | |
626. pass_block = process_route(pattern, keys, conditions) do | |
627. route_eval(&block) | |
628. end | |
629. end | |
630. end | |
631. | |
632. # Run routes defined in superclass. | |
633. if base.superclass.respond_to?(:routes) | |
* C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb in each | |
* | |
618. filter! type, base.superclass if base.superclass.respond_to?(:filters) | |
619. base.filters[type].each { |block| instance_eval(&block) } | |
620. end | |
621. | |
622. # Run routes defined on the class and all superclasses. | |
623. def route!(base=self.class, pass_block=nil) | |
624. if routes = base.routes[@request.request_method] | |
625. routes.each do |pattern, keys, conditions, block| | |
626. pass_block = process_route(pattern, keys, conditions) do | |
627. route_eval(&block) | |
628. end | |
629. end | |
630. end | |
631. | |
632. # Run routes defined in superclass. | |
* C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb in route! | |
* | |
618. filter! type, base.superclass if base.superclass.respond_to?(:filters) | |
619. base.filters[type].each { |block| instance_eval(&block) } | |
620. end | |
621. | |
622. # Run routes defined on the class and all superclasses. | |
623. def route!(base=self.class, pass_block=nil) | |
624. if routes = base.routes[@request.request_method] | |
625. routes.each do |pattern, keys, conditions, block| | |
626. pass_block = process_route(pattern, keys, conditions) do | |
627. route_eval(&block) | |
628. end | |
629. end | |
630. end | |
631. | |
632. # Run routes defined in superclass. | |
* C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb in dispatch! | |
* | |
753. res | |
754. end | |
755. | |
756. # Dispatch a request with error handling. | |
757. def dispatch! | |
758. static! if settings.static? && (request.get? || request.head?) | |
759. filter! :before | |
760. route! | |
761. rescue NotFound => boom | |
762. handle_not_found!(boom) | |
763. rescue ::Exception => boom | |
764. handle_exception!(boom) | |
765. ensure | |
766. filter! :after unless env['sinatra.static_file'] | |
767. end | |
* C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb in call! | |
* | |
546. @response = Response.new | |
547. @params = indifferent_params(@request.params) | |
548. template_cache.clear if settings.reload_templates | |
549. force_encoding(@request.route) | |
550. force_encoding(@params) | |
551. | |
552. @response['Content-Type'] = nil | |
553. invoke { dispatch! } | |
554. invoke { error_block!(response.status) } | |
555. unless @response['Content-Type'] | |
556. if body.respond_to?(:to_ary) and body.first.respond_to? :content_type | |
557. content_type body.first.content_type | |
558. else | |
559. content_type :html | |
560. end | |
* C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb in instance_eval | |
* | |
718. # Creates a Hash with indifferent access. | |
719. def indifferent_hash | |
720. Hash.new {|hash,key| hash[key.to_s] if Symbol === key } | |
721. end | |
722. | |
723. # Run the block with 'throw :halt' support and apply result to the response. | |
724. def invoke(&block) | |
725. res = catch(:halt) { instance_eval(&block) } | |
726. return if res.nil? | |
727. | |
728. case | |
729. when res.respond_to?(:to_str) | |
730. @response.body = [res] | |
731. when res.respond_to?(:to_ary) | |
732. res = res.to_ary | |
* C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb in invoke | |
* | |
718. # Creates a Hash with indifferent access. | |
719. def indifferent_hash | |
720. Hash.new {|hash,key| hash[key.to_s] if Symbol === key } | |
721. end | |
722. | |
723. # Run the block with 'throw :halt' support and apply result to the response. | |
724. def invoke(&block) | |
725. res = catch(:halt) { instance_eval(&block) } | |
726. return if res.nil? | |
727. | |
728. case | |
729. when res.respond_to?(:to_str) | |
730. @response.body = [res] | |
731. when res.respond_to?(:to_ary) | |
732. res = res.to_ary | |
* C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb in catch | |
* | |
718. # Creates a Hash with indifferent access. | |
719. def indifferent_hash | |
720. Hash.new {|hash,key| hash[key.to_s] if Symbol === key } | |
721. end | |
722. | |
723. # Run the block with 'throw :halt' support and apply result to the response. | |
724. def invoke(&block) | |
725. res = catch(:halt) { instance_eval(&block) } | |
726. return if res.nil? | |
727. | |
728. case | |
729. when res.respond_to?(:to_str) | |
730. @response.body = [res] | |
731. when res.respond_to?(:to_ary) | |
732. res = res.to_ary | |
* C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb in invoke | |
* | |
718. # Creates a Hash with indifferent access. | |
719. def indifferent_hash | |
720. Hash.new {|hash,key| hash[key.to_s] if Symbol === key } | |
721. end | |
722. | |
723. # Run the block with 'throw :halt' support and apply result to the response. | |
724. def invoke(&block) | |
725. res = catch(:halt) { instance_eval(&block) } | |
726. return if res.nil? | |
727. | |
728. case | |
729. when res.respond_to?(:to_str) | |
730. @response.body = [res] | |
731. when res.respond_to?(:to_ary) | |
732. res = res.to_ary | |
* C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb in call! | |
* | |
546. @response = Response.new | |
547. @params = indifferent_params(@request.params) | |
548. template_cache.clear if settings.reload_templates | |
549. force_encoding(@request.route) | |
550. force_encoding(@params) | |
551. | |
552. @response['Content-Type'] = nil | |
553. invoke { dispatch! } | |
554. invoke { error_block!(response.status) } | |
555. unless @response['Content-Type'] | |
556. if body.respond_to?(:to_ary) and body.first.respond_to? :content_type | |
557. content_type body.first.content_type | |
558. else | |
559. content_type :html | |
560. end | |
* C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb in call | |
* | |
531. @app = app | |
532. @template_cache = Tilt::Cache.new | |
533. yield self if block_given? | |
534. end | |
535. | |
536. # Rack call interface. | |
537. def call(env) | |
538. dup.call!(env) | |
539. end | |
540. | |
541. attr_accessor :env, :request, :response, :params | |
542. | |
543. def call!(env) # :nodoc: | |
544. @env = env | |
545. @request = Request.new(env) | |
* C:/Ruby187/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/showexceptions.rb in call | |
* | |
17. | |
18. def initialize(app) | |
19. @app = app | |
20. @template = ERB.new(TEMPLATE) | |
21. end | |
22. | |
23. def call(env) | |
24. @app.call(env) | |
25. rescue StandardError, LoadError, SyntaxError => e | |
26. backtrace = pretty(env, e) | |
27. [500, | |
28. {"Content-Type" => "text/html", | |
29. "Content-Length" => backtrace.join.size.to_s}, | |
30. backtrace] | |
31. end | |
* C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb in call | |
* | |
1160. middleware.each { |c,a,b| builder.use(c, *a, &b) } | |
1161. | |
1162. builder.run super | |
1163. builder.to_app | |
1164. end | |
1165. | |
1166. def call(env) | |
1167. synchronize { prototype.call(env) } | |
1168. end | |
1169. | |
1170. private | |
1171. def detect_rack_handler | |
1172. servers = Array(server) | |
1173. servers.each do |server_name| | |
1174. begin | |
* C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb in synchronize | |
* | |
1186. end | |
1187. | |
1188. @@mutex = Mutex.new | |
1189. def synchronize(&block) | |
1190. if lock? | |
1191. @@mutex.synchronize(&block) | |
1192. else | |
1193. yield | |
1194. end | |
1195. end | |
1196. | |
1197. def metadef(message, &block) | |
1198. (class << self; self; end). | |
1199. send :define_method, message, &block | |
1200. end | |
* C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb in call | |
* | |
1160. middleware.each { |c,a,b| builder.use(c, *a, &b) } | |
1161. | |
1162. builder.run super | |
1163. builder.to_app | |
1164. end | |
1165. | |
1166. def call(env) | |
1167. synchronize { prototype.call(env) } | |
1168. end | |
1169. | |
1170. private | |
1171. def detect_rack_handler | |
1172. servers = Array(server) | |
1173. servers.each do |server_name| | |
1174. begin | |
* C:/Ruby187/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/content_length.rb in call | |
* | |
6. include Rack::Utils | |
7. | |
8. def initialize(app) | |
9. @app = app | |
10. end | |
11. | |
12. def call(env) | |
13. status, headers, body = @app.call(env) | |
14. headers = HeaderHash.new(headers) | |
15. | |
16. if !STATUS_WITH_NO_ENTITY_BODY.include?(status.to_i) && | |
17. !headers['Content-Length'] && | |
18. !headers['Transfer-Encoding'] && | |
19. (body.respond_to?(:to_ary) || body.respond_to?(:to_str)) | |
20. | |
* C:/Ruby187/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/handler/webrick.rb in service | |
* | |
45. env["QUERY_STRING"] ||= "" | |
46. env["REQUEST_PATH"] ||= "/" | |
47. unless env["PATH_INFO"] == "" | |
48. path, n = req.request_uri.path, env["SCRIPT_NAME"].length | |
49. env["PATH_INFO"] = path[n, path.length-n] | |
50. end | |
51. | |
52. status, headers, body = @app.call(env) | |
53. begin | |
54. res.status = status.to_i | |
55. headers.each { |k, vs| | |
56. if k.downcase == "set-cookie" | |
57. res.cookies.concat vs.split("\n") | |
58. else | |
59. vs.split("\n").each { |v| | |
* C:/Ruby187/lib/ruby/1.8/webrick/httpserver.rb in service | |
* | |
97. | |
98. servlet, options, script_name, path_info = search_servlet(req.path) | |
99. raise HTTPStatus::NotFound, "`#{req.path}' not found." unless servlet | |
100. req.script_name = script_name | |
101. req.path_info = path_info | |
102. si = servlet.get_instance(self, *options) | |
103. @logger.debug(format("%s is invoked.", si.class.name)) | |
104. si.service(req, res) | |
105. end | |
106. | |
107. def do_OPTIONS(req, res) | |
108. res["allow"] = "GET,HEAD,POST,OPTIONS" | |
109. end | |
110. | |
111. def mount(dir, servlet, *options) | |
* C:/Ruby187/lib/ruby/1.8/webrick/httpserver.rb in run | |
* | |
58. res.request_uri = req.request_uri | |
59. res.request_http_version = req.http_version | |
60. res.keep_alive = req.keep_alive? | |
61. server = lookup_server(req) || self | |
62. if callback = server[:RequestCallback] || server[:RequestHandler] | |
63. callback.call(req, res) | |
64. end | |
65. server.service(req, res) | |
66. rescue HTTPStatus::EOFError, HTTPStatus::RequestTimeout => ex | |
67. res.set_error(ex) | |
68. rescue HTTPStatus::Error => ex | |
69. @logger.error(ex.message) | |
70. res.set_error(ex) | |
71. rescue HTTPStatus::Status => ex | |
72. res.status = ex.code | |
* C:/Ruby187/lib/ruby/1.8/webrick/server.rb in start_thread | |
* | |
166. addr = sock.peeraddr | |
167. @logger.debug "accept: #{addr[3]}:#{addr[1]}" | |
168. rescue SocketError | |
169. @logger.debug "accept: <address unknown>" | |
170. raise | |
171. end | |
172. call_callback(:AcceptCallback, sock) | |
173. block ? block.call(sock) : run(sock) | |
174. rescue Errno::ENOTCONN | |
175. @logger.debug "Errno::ENOTCONN raised" | |
176. rescue ServerError => ex | |
177. msg = "#{ex.class}: #{ex.message}\n\t#{ex.backtrace[0]}" | |
178. @logger.error msg | |
179. rescue Exception => ex | |
180. @logger.error ex | |
* C:/Ruby187/lib/ruby/1.8/webrick/server.rb in start | |
* | |
155. msg = "#{ex.class}: #{ex.message}\n\t#{ex.backtrace[0]}" | |
156. @logger.error msg | |
157. end | |
158. return sock | |
159. end | |
160. | |
161. def start_thread(sock, &block) | |
162. Thread.start{ | |
163. begin | |
164. Thread.current[:WEBrickSocket] = sock | |
165. begin | |
166. addr = sock.peeraddr | |
167. @logger.debug "accept: #{addr[3]}:#{addr[1]}" | |
168. rescue SocketError | |
169. @logger.debug "accept: <address unknown>" | |
* C:/Ruby187/lib/ruby/1.8/webrick/server.rb in start_thread | |
* | |
155. msg = "#{ex.class}: #{ex.message}\n\t#{ex.backtrace[0]}" | |
156. @logger.error msg | |
157. end | |
158. return sock | |
159. end | |
160. | |
161. def start_thread(sock, &block) | |
162. Thread.start{ | |
163. begin | |
164. Thread.current[:WEBrickSocket] = sock | |
165. begin | |
166. addr = sock.peeraddr | |
167. @logger.debug "accept: #{addr[3]}:#{addr[1]}" | |
168. rescue SocketError | |
169. @logger.debug "accept: <address unknown>" | |
* C:/Ruby187/lib/ruby/1.8/webrick/server.rb in start | |
* | |
88. @status = :Running | |
89. while @status == :Running | |
90. begin | |
91. if svrs = IO.select(@listeners, nil, nil, 2.0) | |
92. svrs[0].each{|svr| | |
93. @tokens.pop # blocks while no token is there. | |
94. if sock = accept_client(svr) | |
95. th = start_thread(sock, &block) | |
96. th[:WEBrickThread] = true | |
97. thgroup.add(th) | |
98. else | |
99. @tokens.push(nil) | |
100. end | |
101. } | |
102. end | |
* C:/Ruby187/lib/ruby/1.8/webrick/server.rb in each | |
* | |
85. call_callback(:StartCallback) | |
86. | |
87. thgroup = ThreadGroup.new | |
88. @status = :Running | |
89. while @status == :Running | |
90. begin | |
91. if svrs = IO.select(@listeners, nil, nil, 2.0) | |
92. svrs[0].each{|svr| | |
93. @tokens.pop # blocks while no token is there. | |
94. if sock = accept_client(svr) | |
95. th = start_thread(sock, &block) | |
96. th[:WEBrickThread] = true | |
97. thgroup.add(th) | |
98. else | |
99. @tokens.push(nil) | |
* C:/Ruby187/lib/ruby/1.8/webrick/server.rb in start | |
* | |
85. call_callback(:StartCallback) | |
86. | |
87. thgroup = ThreadGroup.new | |
88. @status = :Running | |
89. while @status == :Running | |
90. begin | |
91. if svrs = IO.select(@listeners, nil, nil, 2.0) | |
92. svrs[0].each{|svr| | |
93. @tokens.pop # blocks while no token is there. | |
94. if sock = accept_client(svr) | |
95. th = start_thread(sock, &block) | |
96. th[:WEBrickThread] = true | |
97. thgroup.add(th) | |
98. else | |
99. @tokens.push(nil) | |
* C:/Ruby187/lib/ruby/1.8/webrick/server.rb in start | |
* | |
16. | |
17. module WEBrick | |
18. | |
19. class ServerError < StandardError; end | |
20. | |
21. class SimpleServer | |
22. def SimpleServer.start | |
23. yield | |
24. end | |
25. end | |
26. | |
27. class Daemon | |
28. def Daemon.start | |
29. exit!(0) if fork | |
30. Process::setsid | |
* C:/Ruby187/lib/ruby/1.8/webrick/server.rb in start | |
* | |
75. @listeners += Utils::create_listeners(address, port, @logger) | |
76. end | |
77. | |
78. def start(&block) | |
79. raise ServerError, "already started." if @status != :Stop | |
80. server_type = @config[:ServerType] || SimpleServer | |
81. | |
82. server_type.start{ | |
83. @logger.info \ | |
84. "#{self.class}#start: pid=#{$$} port=#{@config[:Port]}" | |
85. call_callback(:StartCallback) | |
86. | |
87. thgroup = ThreadGroup.new | |
88. @status = :Running | |
89. while @status == :Running | |
* C:/Ruby187/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/handler/webrick.rb in run | |
* | |
6. module Handler | |
7. class WEBrick < ::WEBrick::HTTPServlet::AbstractServlet | |
8. def self.run(app, options={}) | |
9. options[:BindAddress] = options.delete(:Host) if options[:Host] | |
10. @server = ::WEBrick::HTTPServer.new(options) | |
11. @server.mount "/", Rack::Handler::WEBrick, app | |
12. yield @server if block_given? | |
13. @server.start | |
14. end | |
15. | |
16. def self.shutdown | |
17. @server.shutdown | |
18. @server = nil | |
19. end | |
20. | |
* C:/Ruby187/lib/ruby/gems/1.8/gems/sinatra-1.1.2/lib/sinatra/base.rb in run! | |
* | |
1131. # Thin, Mongrel or WEBrick (in that order) | |
1132. def run!(options={}) | |
1133. set options | |
1134. handler = detect_rack_handler | |
1135. handler_name = handler.name.gsub(/.*::/, '') | |
1136. puts "== Sinatra/#{Sinatra::VERSION} has taken the stage " + | |
1137. "on #{port} for #{environment} with backup from #{handler_name}" unless handler_name =~/cgi/i | |
1138. handler.run self, :Host => bind, :Port => port do |server| | |
1139. [:INT, :TERM].each { |sig| trap(sig) { quit!(server, handler_name) } } | |
1140. set :running, true | |
1141. end | |
1142. rescue Errno::EADDRINUSE => e | |
1143. puts "== Someone is already performing on port #{port}!" | |
1144. end | |
1145. | |
* C:/Ruby187/lib/ruby/gems/1.8/gems/gollum-1.1.1/bin/gollum in nil | |
* | |
95. rescue Grit::InvalidGitRepositoryError, Grit::NoSuchPathError | |
96. puts "Invalid Gollum wiki at #{File.expand_path(gollum_path).inspect}" | |
97. exit 0 | |
98. end | |
99. else | |
100. require 'gollum/frontend/app' | |
101. Precious::App.set(:gollum_path, gollum_path) | |
102. Precious::App.run!(options) | |
103. end | |
* C:/Ruby187/bin/gollum in load | |
* | |
12. | |
13. if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then | |
14. version = $1 | |
15. ARGV.shift | |
16. end | |
17. | |
18. gem 'gollum', version | |
19. load Gem.bin_path('gollum', 'gollum', version) | |
* C:/Ruby187/bin/gollum in nil | |
* | |
12. | |
13. if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then | |
14. version = $1 | |
15. ARGV.shift | |
16. end | |
17. | |
18. gem 'gollum', version | |
19. load Gem.bin_path('gollum', 'gollum', version) | |
GET | |
No GET data. | |
POST | |
No POST data. | |
COOKIES | |
Variable Value | |
_wiki_session | |
"BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo\nSGFzaHsABjoKQHVzZWR7AA==--48b21217e9c163c2488b73b3f7623172bbd975af" | |
Rack ENV | |
Variable Value | |
GATEWAY_INTERFACE | |
CGI/1.1 | |
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.7 | |
HTTP_ACCEPT_ENCODING | |
gzip,deflate | |
HTTP_ACCEPT_LANGUAGE | |
en-us,en;q=0.5 | |
HTTP_CACHE_CONTROL | |
max-age=0 | |
HTTP_CONNECTION | |
keep-alive | |
HTTP_COOKIE | |
_wiki_session=BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo%0ASGFzaHsABjoKQHVzZWR7AA%3D%3D--48b21217e9c163c2488b73b3f7623172bbd975af | |
HTTP_HOST | |
localhost:4567 | |
HTTP_KEEP_ALIVE | |
115 | |
HTTP_USER_AGENT | |
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 ( .NET CLR 3.5.30729; .NET CLR 4.0.20506) | |
HTTP_VERSION | |
HTTP/1.1 | |
PATH_INFO | |
/ | |
QUERY_STRING | |
REMOTE_ADDR | |
127.0.0.1 | |
REMOTE_HOST | |
mikeLaptop | |
REQUEST_METHOD | |
GET | |
REQUEST_PATH | |
/ | |
REQUEST_URI | |
http://localhost:4567/ | |
SCRIPT_NAME | |
SERVER_NAME | |
localhost | |
SERVER_PORT | |
4567 | |
SERVER_PROTOCOL | |
HTTP/1.1 | |
SERVER_SOFTWARE | |
WEBrick/1.3.1 (Ruby/1.8.7/2010-12-23) | |
rack.errors | |
#<IO:0x831da88> | |
rack.input | |
#<StringIO:0x5045838> | |
rack.multiprocess | |
false | |
rack.multithread | |
true | |
rack.request.cookie_hash | |
{"_wiki_session"=>"BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo\nSGFzaHsABjoKQHVzZWR7AA==--48b21217e9c163c2488b73b3f7623172bbd975af"} | |
rack.request.cookie_string | |
_wiki_session=BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo%0ASGFzaHsABjoKQHVzZWR7AA%3D%3D--48b21217e9c163c2488b73b3f7623172bbd975af | |
rack.request.query_hash | |
{} | |
rack.request.query_string | |
rack.run_once | |
false | |
rack.url_scheme | |
http | |
rack.version | |
[1, 1] | |
sinatra.error | |
#<Grit::InvalidGitRepositoryError: C:/Ruby187/lib/ruby/gems/1.8/gems/gollum-1.1.1> | |
You're seeing this error because you have enabled the show_exceptions setting. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please help me what does this mean? Iam working from my local station. I was trying to lauch this simple app from my local station and it showed this... Iam a five day old newbie
application error
NoMethodError at /
undefined method `include?' for nil:NilClass
BACKTRACE
(expand)
JUMP TO: GET POST COOKIES ENV
GET
No GET data.
POST
No POST data.
COOKIES
No cookie data.
Rack ENV
Variable Value
GATEWAY_INTERFACE
CGI/1.1
HTTP_ACCEPT
text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
HTTP_ACCEPT_ENCODING
gzip, deflate
HTTP_ACCEPT_LANGUAGE
en-us,en;q=0.5
HTTP_CONNECTION
keep-alive
HTTP_HOST
localhost:4567
HTTP_USER_AGENT
Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko/20100101 Firefox/11.0
HTTP_VERSION
HTTP/1.1
PATH_INFO
/
QUERY_STRING
REMOTE_ADDR
127.0.0.1
REMOTE_HOST
localhost
REQUEST_METHOD
GET
REQUEST_PATH
/
REQUEST_URI
http://localhost:4567/
SCRIPT_NAME
SERVER_NAME
localhost
SERVER_PORT
4567
SERVER_PROTOCOL
HTTP/1.1
SERVER_SOFTWARE
WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
rack.errors
IO:
rack.input
StringIO:0xc75000
rack.multiprocess
false
rack.multithread
true
rack.request.cookie_hash
{}
rack.request.query_hash
{}
rack.request.query_string
rack.run_once
false
rack.session
<Rack::Session::Abstract::SessionHash:0x63a1f4 not yet loaded>
rack.session.options
{:path=>"/", :domain=>nil, :expire_after=>nil, :secure=>false, :httponly=>true, :defer=>false, :renew=>false, :sidbits=>128, :secure_random=>SecureRandom, :coder=>#Rack::Session::Cookie::Base64::Marshal:0xfcf3d8}
rack.url_scheme
http
rack.version
[1, 1]
You're seeing this error because you have enabled the show_exceptions setting.