Guest User

Untitled

a guest
Feb 19th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.54 KB | None | 0 0
  1.  
  2. Internal Server Error 500
  3. undefined method `last' for nil:NilClass
  4. Parameters
  5. Parameter Value
  6. format nil
  7. original_cookies {"_established_session_id"=>"BAh7BzoJdXNlcmkHOg1yZWRpcmVjdDA=--21b018c44a94a58fca4648cf894f76a066b51c90"}
  8. action "server_error"
  9. exception #
  10. controller "profiles"
  11. original_params {"format"=>nil, "original_cookies"=>{"_established_session_id"=>"BAh7BzoJdXNlcmkHOg1yZWRpcmVjdDA=--21b018c44a94a58fca4648cf894f76a066b51c90"}, "action"=>"internal_server_error", "exception"=>#, "controller"=>"profiles", "original_params"=>{"format"=>nil, "action"=>"show", "controller"=>"profiles", "login"=>"watts"}, "login"=>"watts", "original_session"=>#}
  12. login "watts"
  13. original_session #
  14. Session
  15. Key Value
  16. Cookies
  17. Cookie Value
  18. _established_session_id "BAh7BzoJdXNlcmkHOg1yZWRpcmVjdDA=--21b018c44a94a58fca4648cf894f76a066b51c90"
  19. Named Routes
  20. None
  21.  
  22. models/profile.rb in "gender_name" 154
  23. 149 def self.genders 150 [%w(m Male), %w(f Female)] 151 end 152 153 def self.gender_name(abbr) 154 genders.detect{|row|row.first == abbr}.last 155 end 156 157 def self.heights 158 (25..42).map{|i| [i*2, "%d'%d\" (%dcm)" % [i*2/12, i*2%12, i*2*2.54]]} 159 end
  24.  
  25. models/profile.rb in "default_profile_photo" 107
  26. 102 photos.first || default_profile_photo 103 end 104 105 def default_profile_photo 106 OpenStruct.new( 107 :medium => "/images/profile_default_#{Profile.gender_name(gender)}.png", 108 :small => "/images/profile_default_#{Profile.gender_name(gender)}_small.png" 109 ) 110 end 111 112 def responses
  27.  
  28. models/profile.rb in "profile_photo" 102
  29. 97 def female? 98 not male? 99 end 100 101 def profile_photo 102 photos.first || default_profile_photo 103 end 104 105 def default_profile_photo 106 OpenStruct.new( 107 :medium => "/images/profile_default_#{Profile.gender_name(gender)}.png",
  30.  
  31. views/profiles/show.html.haml in "__Users__Watts__Sites__junto__app__views__profiles__show_html_haml" 2
  32. 1#profile.clearfix 2 #mini_gallery 3 .thumb= image_tag @profile.profile_photo.medium, {:id => 'main_photo'} 4 #thumb_list 5 - photos = @profile.photos[0..3] 6 - photos.each do |img| 7 = link_to image_tag(img.small), img.medium, :class => 'thumb_small' + (img == photo......
  33.  
  34. merb-core-0.9.4/lib/merb-core/controller/mixins/render.rb in "send" 120
  35. 115 "If you use Haml or some other template plugin, make sure you required Merb plugi...... 116 "in your init file." 117 end 118 119 # Call the method in question and throw the content for later consumption by the layo...... 120 throw_content(:for_layout, self.send(template_method)) 121 122 # Do we have a string to render? 123 elsif thing.is_a?(String) 124 125 # Throw it for later consumption by the layout
  36.  
  37. merb-core-0.9.4/lib/merb-core/controller/mixins/render.rb in "render" 120
  38. 115 "If you use Haml or some other template plugin, make sure you required Merb plugi...... 116 "in your init file." 117 end 118 119 # Call the method in question and throw the content for later consumption by the layo...... 120 throw_content(:for_layout, self.send(template_method)) 121 122 # Do we have a string to render? 123 elsif thing.is_a?(String) 124 125 # Throw it for later consumption by the layout
  39.  
  40. controllers/profiles.rb in "show" 6
  41. 1class Profiles < Application 2 3 def show 4 @profile = Profile.get_by_login(params[:login]) 5 raise NotFound unless @profile 6 render 7 end 8 9 def edit 10 @profile = Profile.get_by_login(params[:login]) 11 raise NotFound unless @profile
  42.  
  43. merb-core-0.9.4/lib/merb-core/controller/abstract_controller.rb in "send" 262
  44. 257 # This method exists to provide an overridable hook for ActionArgs 258 # 259 # ==== Parameters 260 # action<~to_s>:: the action method to dispatch to 261 def _call_action(action) 262 send(action) 263 end 264 265 # ==== Parameters 266 # filter_set<Array[Filter]>:: 267 # A set of filters in the form [[:filter, rule], [:filter, rule]]
  45.  
  46. merb-core-0.9.4/lib/merb-core/controller/abstract_controller.rb in "_call_action" 262
  47. 257 # This method exists to provide an overridable hook for ActionArgs 258 # 259 # ==== Parameters 260 # action<~to_s>:: the action method to dispatch to 261 def _call_action(action) 262 send(action) 263 end 264 265 # ==== Parameters 266 # filter_set<Array[Filter]>:: 267 # A set of filters in the form [[:filter, rule], [:filter, rule]]
  48.  
  49. merb-core-0.9.4/lib/merb-core/controller/abstract_controller.rb in "_dispatch" 242
  50. 237 @_benchmarks[:before_filters_time] = Time.now - start if _before_filters 238 result 239 end 240 241 @body = case caught 242 when :filter_chain_completed then _call_action(action_name) 243 when String then caught 244 when nil then _filters_halted 245 when Symbol then __send__(caught) 246 when Proc then caught.call(self) 247 else
  51.  
  52. merb-core-0.9.4/lib/merb-core/controller/merb_controller.rb in "_dispatch" 197
  53. 192 #--- 193 # @semipublic 194 def _dispatch(action=:index) 195 start = Time.now 196 if self.class.callable_actions.include?(action.to_s) 197 super(action) 198 else 199 raise ActionNotFound, "Action '#{action}' was not found in #{self.class}" 200 end 201 @_benchmarks[:action_time] = Time.now - start 202 end
  54.  
  55. merb-core-0.9.4/lib/merb-core/dispatch/dispatcher.rb in "dispatch_action" 136
  56. 131 # dispatched to. 132 def dispatch_action(klass, action, request, status=200) 133 # build controller 134 controller = klass.new(request, status) 135 if use_mutex 136 @@mutex.synchronize { controller._dispatch(action) } 137 else 138 controller._dispatch(action) 139 end 140 controller 141 end
  57.  
  58. merb-core-0.9.4/lib/merb-core/dispatch/dispatcher.rb in "synchronize" 136
  59. 131 # dispatched to. 132 def dispatch_action(klass, action, request, status=200) 133 # build controller 134 controller = klass.new(request, status) 135 if use_mutex 136 @@mutex.synchronize { controller._dispatch(action) } 137 else 138 controller._dispatch(action) 139 end 140 controller 141 end
  60.  
  61. merb-core-0.9.4/lib/merb-core/dispatch/dispatcher.rb in "dispatch_action" 136
  62. 131 # dispatched to. 132 def dispatch_action(klass, action, request, status=200) 133 # build controller 134 controller = klass.new(request, status) 135 if use_mutex 136 @@mutex.synchronize { controller._dispatch(action) } 137 else 138 controller._dispatch(action) 139 end 140 controller 141 end
  63.  
  64. merb-core-0.9.4/lib/merb-core/dispatch/dispatcher.rb in "handle" 82
  65. 77 if route.allow_fixation? && request.params.key?(Merb::Controller._session_id_key) 78 Merb.logger.info("Fixated session id: #{Merb::Controller._session_id_key}") 79 request.cookies[Merb::Controller._session_id_key] = request.params[Merb::Controller...... 80 end 81 82 controller = dispatch_action(klass, action, request) 83 controller._benchmarks[:dispatch_time] = Time.now - start 84 controller.route = route 85 Merb.logger.info controller._benchmarks.inspect 86 Merb.logger.flush 87
  66.  
  67. merb-core-0.9.4/lib/merb-core/rack/application.rb in "call_without_sass" 7
  68. 2 module Rack 3 class Application 4 5 def call(env) 6 begin 7 controller = ::Merb::Dispatcher.handle(env) 8 rescue Object => e 9 return [500, {"Content-Type"=>"text/html"}, e.message + "<br/>" + e.backtrace.joi...... 10 end 11 Merb.logger.info "\n\n" 12 Merb.logger.flush
  69.  
  70. /Users/Watts/Sites/junto/gems/gems/haml-2.0.2/lib/sass/plugin/merb.rb in "call" 34
  71. 29 if !Sass::Plugin.checked_for_updates || 30 Sass::Plugin.options[:always_update] || Sass::Plugin.options[:always_check] 31 Sass::Plugin.update_stylesheets 32 end 33 34 call_without_sass(env) 35 end 36 alias_method :call_without_sass, :call 37 alias_method :call, :call_with_sass 38 end 39
  72.  
  73. merb-core-0.9.4/lib/merb-core/rack/middleware/static.rb in "call" 22
  74. 17 env['PATH_INFO'] = cached_path 18 serve_static(env) 19 elsif path =~ /favicon\.ico/ 20 return [404, {"Content-Type"=>"text/html"}, "404 Not Found."] 21 else 22 @app.call(env) 23 end 24 end 25 26 # ==== Parameters 27 # path<String>:: The path to the file relative to the server root.
  75.  
  76. merb-core-0.9.4/lib/merb-core/rack/handler/mongrel.rb in "process" 72
  77. 67 "rack.streaming" => true 68 }) 69 env["QUERY_STRING"] ||= "" 70 env.delete "PATH_INFO" if env["PATH_INFO"] == "" 71 72 status, headers, body = @app.call(env) 73 74 begin 75 response.status = status.to_i 76 headers.each { |k, vs| 77 vs.each { |v|
  78.  
  79. mongrel-1.1.5/lib/mongrel.rb in "process_client" 159
  80. 154 # request is good so far, continue processing the response 155 response = HttpResponse.new(client) 156 157 # Process each handler in registered order until we run out or one finalizes ...... 158 handlers.each do |handler| 159 handler.process(request, response) 160 break if response.done or client.closed? 161 end 162 163 # And finally, if nobody closed the response off, we finalize it. 164 unless response.done or client.closed?
  81.  
  82. mongrel-1.1.5/lib/mongrel.rb in "each" 158
  83. 153 154 # request is good so far, continue processing the response 155 response = HttpResponse.new(client) 156 157 # Process each handler in registered order until we run out or one finalizes ...... 158 handlers.each do |handler| 159 handler.process(request, response) 160 break if response.done or client.closed? 161 end 162 163 # And finally, if nobody closed the response off, we finalize it.
  84.  
  85. mongrel-1.1.5/lib/mongrel.rb in "process_client" 158
  86. 153 154 # request is good so far, continue processing the response 155 response = HttpResponse.new(client) 156 157 # Process each handler in registered order until we run out or one finalizes ...... 158 handlers.each do |handler| 159 handler.process(request, response) 160 break if response.done or client.closed? 161 end 162 163 # And finally, if nobody closed the response off, we finalize it.
  87.  
  88. mongrel-1.1.5/lib/mongrel.rb in "run" 285
  89. 280 if worker_list.length >= @num_processors 281 STDERR.puts "Server overloaded with #{worker_list.length} processors (#@num...... 282 client.close rescue nil 283 reap_dead_workers("max processors") 284 else 285 thread = Thread.new(client) {|c| process_client(c) } 286 thread[:started_on] = Time.now 287 @workers.add(thread) 288 289 sleep @throttle if @throttle > 0 290 end
  90.  
  91. mongrel-1.1.5/lib/mongrel.rb in "initialize" 285
  92. 280 if worker_list.length >= @num_processors 281 STDERR.puts "Server overloaded with #{worker_list.length} processors (#@num...... 282 client.close rescue nil 283 reap_dead_workers("max processors") 284 else 285 thread = Thread.new(client) {|c| process_client(c) } 286 thread[:started_on] = Time.now 287 @workers.add(thread) 288 289 sleep @throttle if @throttle > 0 290 end
  93.  
  94. mongrel-1.1.5/lib/mongrel.rb in "new" 285
  95. 280 if worker_list.length >= @num_processors 281 STDERR.puts "Server overloaded with #{worker_list.length} processors (#@num...... 282 client.close rescue nil 283 reap_dead_workers("max processors") 284 else 285 thread = Thread.new(client) {|c| process_client(c) } 286 thread[:started_on] = Time.now 287 @workers.add(thread) 288 289 sleep @throttle if @throttle > 0 290 end
  96.  
  97. mongrel-1.1.5/lib/mongrel.rb in "run" 285
  98. 280 if worker_list.length >= @num_processors 281 STDERR.puts "Server overloaded with #{worker_list.length} processors (#@num...... 282 client.close rescue nil 283 reap_dead_workers("max processors") 284 else 285 thread = Thread.new(client) {|c| process_client(c) } 286 thread[:started_on] = Time.now 287 @workers.add(thread) 288 289 sleep @throttle if @throttle > 0 290 end
  99.  
  100. mongrel-1.1.5/lib/mongrel.rb in "initialize" 268
  101. 263 264 if defined?($tcp_defer_accept_opts) and $tcp_defer_accept_opts 265 @socket.setsockopt(*$tcp_defer_accept_opts) rescue nil 266 end 267 268 @acceptor = Thread.new do 269 begin 270 while true 271 begin 272 client = @socket.accept 273
  102.  
  103. mongrel-1.1.5/lib/mongrel.rb in "new" 268
  104. 263 264 if defined?($tcp_defer_accept_opts) and $tcp_defer_accept_opts 265 @socket.setsockopt(*$tcp_defer_accept_opts) rescue nil 266 end 267 268 @acceptor = Thread.new do 269 begin 270 while true 271 begin 272 client = @socket.accept 273
  105.  
  106. mongrel-1.1.5/lib/mongrel.rb in "run" 268
  107. 263 264 if defined?($tcp_defer_accept_opts) and $tcp_defer_accept_opts 265 @socket.setsockopt(*$tcp_defer_accept_opts) rescue nil 266 end 267 268 @acceptor = Thread.new do 269 begin 270 while true 271 begin 272 client = @socket.accept 273
  108.  
  109. merb-core-0.9.4/lib/merb-core/rack/adapter/mongrel.rb in "start" 22
  110. 17 def self.start(opts={}) 18 Merb.logger.warn!("Using Mongrel adapter") 19 server = ::Mongrel::HttpServer.new(opts[:host], opts[:port].to_i) 20 Merb::Server.change_privilege 21 server.register('/', ::Merb::Rack::Handler::Mongrel.new(opts[:app])) 22 server.run.join 23 end 24 end 25 end 26end
  111.  
  112. merb-core-0.9.4/lib/merb-core/server.rb in "start" 53
  113. 48 trap('TERM') { exit } 49 trap('INT') { puts "\nExiting"; exit } 50 puts "Running bootloaders..." if Merb::Config[:verbose] 51 BootLoader.run 52 puts "Starting Rack adapter..." if Merb::Config[:verbose] 53 Merb.adapter.start(Merb::Config.to_hash) 54 end 55 end 56 57 # ==== Parameters 58 # port<~to_s>:: The port to check for Merb instances on.
  114.  
  115. merb-core-0.9.4/lib/merb-core.rb in "start" 87
  116. 82 when :kill 83 Merb::Server.kill(Merb::Config[:port], 1) 84 when :kill_9 85 Merb::Server.kill(Merb::Config[:port], 9) 86 else 87 Merb::Server.start(Merb::Config[:port], Merb::Config[:cluster]) 88 end 89 end 90 91 # Start the Merb environment, but only if it hasn't been loaded yet. 92 #
  117.  
  118. merb-core-0.9.4/bin/merb in "?" ?
  119. 1#!/usr/bin/env ruby 2require "merb-core" 3 4if ARGV[0] && ARGV[0] =~ /^[^-]/ 5 ARGV.push "-H"
  120.  
  121. /opt/local/bin/merb in "load" 19
  122. 14 version = $1 15 ARGV.shift 16end 17 18gem 'merb-core', version 19load 'merb'
  123.  
  124. /opt/local/bin/merb in "?" ?
  125. 1#!/opt/local/bin/ruby 2# 3# This file was generated by RubyGems. 4# 5# The application 'merb-core' is installed as part of a gem, and
  126. lots of love, from merb
Add Comment
Please, Sign In to add comment