This repository was archived by the owner on Aug 13, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
NoMethodError - undefined method `collection' for nil:NilClass #20
Copy link
Copy link
Open
Description
I'm concerned about posting an issue here because it doesn't seem anyone is paying any attention.
Regardless, I've been trying to set up a Gaps server and I get an internal server error. The log looks like this:
10.1.0.65 - - [09/Nov/2015:18:49:21 +0000] "GET / HTTP/1.0" 302 - 0.0095
10.1.0.65 - - [09/Nov/2015:18:49:21 +0000] "GET /subs HTTP/1.0" 303 - 0.0010
2015-11-09 18:49:21 - NoMethodError - undefined method `collection' for nil:NilClass:
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/mongo_mapper-0.13.1/lib/mongo_mapper/plugins/persistence.rb:58:in `collection'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/mongo_mapper-0.13.1/lib/mongo_mapper/plugins/querying.rb:51:in `query'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/mongo_mapper-0.13.1/lib/mongo_mapper/plugins/sci.rb:70:in `query'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/mongo_mapper-0.13.1/lib/mongo_mapper/plugins/identity_map.rb:61:in `query'
/srv/www/gaps/releases/20151109063442/lib/gaps/db/user.rb:32:in `lister'
/srv/www/gaps/releases/20151109063442/bin/gaps_server.rb:102:in `block in <class:GapsServer>'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1610:in `call'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1610:in `block in compile!'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:974:in `[]'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:974:in `block (3 levels) in route!'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:993:in `route_eval'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:974:in `block (2 levels) in route!'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1014:in `block in process_route'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1012:in `catch'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1012:in `process_route'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:972:in `block in route!'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:971:in `each'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:971:in `route!'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1084:in `block in dispatch!'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1066:in `block in invoke'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1066:in `catch'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1066:in `invoke'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1081:in `dispatch!'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:906:in `block in call!'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1066:in `block in invoke'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1066:in `catch'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1066:in `invoke'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:906:in `call!'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:894:in `call'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/commonlogger.rb:33:in `call'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:218:in `call'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:211:in `call'
/srv/www/gaps/releases/20151109063442/lib/gaps/third/healthcheck.rb:15:in `call'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.3/lib/rack/protection/xss_header.rb:18:in `call'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.3/lib/rack/protection/path_traversal.rb:16:in `call'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.3/lib/rack/protection/json_csrf.rb:18:in `call'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/rack-protection-1.5.3/lib/rack/protection/frame_options.rb:31:in `call'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/nulllogger.rb:9:in `call'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/head.rb:13:in `call'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:181:in `call'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:2021:in `call'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1486:in `block in call'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1795:in `synchronize'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1486:in `call'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/puma-2.14.0/lib/puma/configuration.rb:78:in `call'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/puma-2.14.0/lib/puma/server.rb:541:in `handle_request'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/puma-2.14.0/lib/puma/server.rb:388:in `process_client'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/puma-2.14.0/lib/puma/server.rb:270:in `block in run'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/puma-2.14.0/lib/puma/thread_pool.rb:106:in `call'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/puma-2.14.0/lib/puma/thread_pool.rb:106:in `block in spawn_thread'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/logging-2.0.0/lib/logging/diagnostic_context.rb:448:in `call'
/srv/www/gaps/releases/20151109063442/vendor/bundle/ruby/2.1.0/gems/logging-2.0.0/lib/logging/diagnostic_context.rb:448:in `block in create_with_logging_context'
10.1.0.65 - - [09/Nov/2015:18:49:21 +0000] "GET /login HTTP/1.0" 500 30 0.0015
My gems look like:
# bundle exec gem list
*** LOCAL GEMS ***
activemodel (4.2.4)
activesupport (4.2.4)
addressable (2.3.8)
autoparse (0.3.3)
bson (1.12.3)
bson_ext (1.12.3)
builder (3.2.2)
bundler (1.5.3)
chalk-config (0.2.1)
chalk-log (0.1.3)
coderay (1.1.0)
configatron (4.5.0)
domain_name (0.5.25)
einhorn (0.6.4)
erubis (2.7.0)
extlib (0.9.16)
faraday (0.9.2)
gmail-britta (0.1.6)
google-api-client (0.8.6)
googleauth (0.4.2)
haml (3.1.8)
http-cookie (1.0.2)
i18n (0.7.0)
json (1.8.3)
jwt (1.5.2)
kgio (2.10.0)
launchy (2.4.3)
little-plugger (1.1.4)
logging (2.0.0)
lspace (0.13)
mail (2.6.3)
memoist (0.12.0)
metaclass (0.0.4)
method_source (0.8.2)
mime-types (2.6.2)
minitest (5.8.2)
mocha (1.1.0)
mongo (1.12.3)
mongo_mapper (0.13.1)
multi_json (1.11.2)
multipart-post (2.0.0)
netrc (0.10.3)
plucky (0.6.6)
pry (0.10.3)
puma (2.14.0)
rack (1.6.4)
rack-flash3 (1.0.5)
rack-protection (1.5.3)
rack_csrf (2.5.0)
raindrops (0.15.0)
rake (10.4.2)
rest-client (1.8.0)
retriable (1.4.1)
signet (0.6.1)
sinatra (1.4.6)
slop (3.6.0)
thread (0.2.2)
thread_safe (0.3.5)
tilt (2.0.1)
tzinfo (1.2.2)
unf (0.1.4)
unf_ext (0.0.7.1)
unicorn (4.9.0)
The mongo part of my site.yaml is stupidly simple:
db:
# Which database name to use.
database: test
# URL to connect to your MongoDB instance (where all state is
# persisted). Note that Gaps stores some interesting state, such as
# people's filter configuration and group categorization.
mongodb_url: mongodb://localhost:27017
And the database contains actual data... I did a mongodump of our working Gaps install and mongorestored it in an attempt to fix this issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels