Skip to content

Instantly share code, notes, and snippets.

@jonmagic
Created March 10, 2010 20:50
Show Gist options
  • Select an option

  • Save jonmagic/328373 to your computer and use it in GitHub Desktop.

Select an option

Save jonmagic/328373 to your computer and use it in GitHub Desktop.
NoMethodError at /gridfs/4b98007de5947c54f7000010
You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occurred while evaluating nil.[]
Ruby /Library/Ruby/Gems/1.8/gems/mongo-0.19.1/lib/../lib/mongo/gridfs/grid_io.rb: in read_all, line 208
Web GET localhost/gridfs/4b98007de5947c54f7000010
Jump to:
GETPOSTCookiesENV
Traceback (innermost first)
/Library/Ruby/Gems/1.8/gems/mongo-0.19.1/lib/../lib/mongo/gridfs/grid_io.rb: in read_all
buf << @current_chunk['data'].to_s...
/Library/Ruby/Gems/1.8/gems/mongo-0.19.1/lib/../lib/mongo/gridfs/grid_io.rb: in read
read_all...
/Library/Ruby/Gems/1.8/gems/jnunemaker-rack-gridfs-0.3.0/lib/rack/gridfs.rb: in gridfs_request
[200, {'Content-Type' => file.content_type}, [file.read]]...
/Library/Ruby/Gems/1.8/gems/jnunemaker-rack-gridfs-0.3.0/lib/rack/gridfs.rb: in call
gridfs_request($1)...
/Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/rails/rack/static.rb: in call
@app.call(env)...
/Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/rails/rack/log_tailer.rb: in call
response = @app.call(env)...
/Library/Ruby/Gems/1.8/gems/rack-1.0.1/lib/rack/lint.rb: in _call
status, headers, @body = @app.call(env)...
/Library/Ruby/Gems/1.8/gems/rack-1.0.1/lib/rack/lint.rb: in call
dup._call(env)...
/Library/Ruby/Gems/1.8/gems/rack-1.0.1/lib/rack/showexceptions.rb: in call
@app.call(env)...
/Library/Ruby/Gems/1.8/gems/rack-1.0.1/lib/rack/commonlogger.rb: in _call
@status, @header, @body = @app.call(env)...
/Library/Ruby/Gems/1.8/gems/rack-1.0.1/lib/rack/commonlogger.rb: in call
dup._call(env)...
/Library/Ruby/Gems/1.8/gems/rack-1.0.1/lib/rack/content_length.rb: in call
status, headers, body = @app.call(env)...
/Library/Ruby/Gems/1.8/gems/rack-1.0.1/lib/rack/chunked.rb: in call
status, headers, body = @app.call(env)...
/Library/Ruby/Gems/1.8/gems/rack-1.0.1/lib/rack/handler/mongrel.rb: in process
status, headers, body = @app.call(env)...
/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb: in process_client
handler.process(request, response)...
/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb: in each
handlers.each do |handler|...
/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb: in process_client
handlers.each do |handler|...
/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb: in run
thread = Thread.new(client) {|c| process_client(c) }...
/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb: in initialize
thread = Thread.new(client) {|c| process_client(c) }...
/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb: in new
thread = Thread.new(client) {|c| process_client(c) }...
/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb: in run
thread = Thread.new(client) {|c| process_client(c) }...
/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb: in initialize
@acceptor = Thread.new do...
/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb: in new
@acceptor = Thread.new do...
/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb: in run
@acceptor = Thread.new do...
/Library/Ruby/Gems/1.8/gems/rack-1.0.1/lib/rack/handler/mongrel.rb: in run
server.run.join...
/Library/Ruby/Gems/1.8/gems/rack-1.0.1/bin/rackup: in nil
server.run app, options...
/usr/bin/rackup: in load
load Gem.bin_path('rack', 'rackup', version)...
/usr/bin/rackup: in nil
load Gem.bin_path('rack', 'rackup', version)...
Request information
GET
No GET data.
POST
No POST data.
COOKIES
No cookie data.
Rack ENV
Variable Value
GATEWAY_INTERFACE
CGI/1.2
HTTP_ACCEPT
application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
HTTP_ACCEPT_ENCODING
gzip, deflate
HTTP_ACCEPT_LANGUAGE
en-us
HTTP_CONNECTION
keep-alive
HTTP_HOST
localhost:3333
HTTP_USER_AGENT
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-us) AppleWebKit/531.21.8 (KHTML, like Gecko) Version/4.0.4 Safari/531.21.10
HTTP_VERSION
HTTP/1.1
PATH_INFO
/gridfs/4b98007de5947c54f7000010
QUERY_STRING
REMOTE_ADDR
127.0.0.1
REQUEST_METHOD
GET
REQUEST_PATH
/gridfs/4b98007de5947c54f7000010
REQUEST_URI
/gridfs/4b98007de5947c54f7000010
SCRIPT_NAME
SERVER_NAME
localhost
SERVER_PORT
3333
SERVER_PROTOCOL
HTTP/1.1
SERVER_SOFTWARE
Mongrel 1.1.5
rack.errors
#<Rack::Lint::ErrorWrapper:0x103141de8 @error=#<IO:0x10016fb88>>
rack.input
#<Rack::Lint::InputWrapper:0x103141e60 @input=#<StringIO:0x103147518>>
rack.multiprocess
false
rack.multithread
true
rack.request.form_hash
{}
rack.request.form_input
#<Rack::Lint::InputWrapper:0x103141e60 @input=#<StringIO:0x103147518>>
rack.request.form_vars
rack.request.query_hash
{}
rack.request.query_string
rack.run_once
false
rack.url_scheme
http
rack.version
[1, 0]
You're seeing this error because you use Rack::ShowExceptions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment