Basic Installation and Configuration

Post questions and answers here about how to install, configure and run annotation studio and the MIT annotation data store, for development and production environments.

I’m having trouble getting the latest version of Annotation Studio running. I have it installed and configured on my local machine and was able to get to the user registration page, but now the application crashes with this message:

  TypeError
    in UsersController#show

no implicit conversion of nil into String

Here’s the full trace:

jwt (0.1.11) lib/jwt.rb:35:in `digest'
jwt (0.1.11) lib/jwt.rb:35:in `sign_hmac'
jwt (0.1.11) lib/jwt.rb:18:in `sign'
jwt (0.1.11) lib/jwt.rb:57:in `encode'
app/controllers/application_controller.rb:10:in `signed_in?'
app/controllers/application_controller.rb:24:in `authenticate'
activesupport (3.2.17) lib/active_support/callbacks.rb:429:in `_run__1178335665537682750__process_action__963417118507697815__callbacks'
activesupport (3.2.17) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.17) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
activesupport (3.2.17) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.17) lib/abstract_controller/callbacks.rb:17:in `process_action'
actionpack (3.2.17) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (3.2.17) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
activesupport (3.2.17) lib/active_support/notifications.rb:123:in `block in instrument'
activesupport (3.2.17) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (3.2.17) lib/active_support/notifications.rb:123:in `instrument'
actionpack (3.2.17) lib/action_controller/metal/instrumentation.rb:29:in `process_action'
actionpack (3.2.17) lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
activerecord (3.2.17) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
newrelic_rpm (3.7.3.204) lib/new_relic/agent/instrumentation/rails3/action_controller.rb:38:in `block in process_action'
newrelic_rpm (3.7.3.204) lib/new_relic/agent/instrumentation/controller_instrumentation.rb:335:in `perform_action_with_newrelic_trace'
newrelic_rpm (3.7.3.204) lib/new_relic/agent/instrumentation/rails3/action_controller.rb:37:in `process_action'
actionpack (3.2.17) lib/abstract_controller/base.rb:121:in `process'
actionpack (3.2.17) lib/abstract_controller/rendering.rb:45:in `process'
actionpack (3.2.17) lib/action_controller/metal.rb:203:in `dispatch'
actionpack (3.2.17) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
actionpack (3.2.17) lib/action_controller/metal.rb:246:in `block in action'
actionpack (3.2.17) lib/action_dispatch/routing/route_set.rb:73:in `call'
actionpack (3.2.17) lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
actionpack (3.2.17) lib/action_dispatch/routing/route_set.rb:36:in `call'
actionpack (3.2.17) lib/action_dispatch/routing/mapper.rb:43:in `call'
journey (1.0.4) lib/journey/router.rb:68:in `block in call'
journey (1.0.4) lib/journey/router.rb:56:in `each'
journey (1.0.4) lib/journey/router.rb:56:in `call'
actionpack (3.2.17) lib/action_dispatch/routing/route_set.rb:608:in `call'
meta_request (0.2.8) lib/meta_request/middlewares/app_request_handler.rb:13:in `call'
rack-contrib (1.1.0) lib/rack/contrib/response_headers.rb:17:in `call'
meta_request (0.2.8) lib/meta_request/middlewares/headers.rb:16:in `call'
meta_request (0.2.8) lib/meta_request/middlewares/meta_request_handler.rb:13:in `call'
newrelic_rpm (3.7.3.204) lib/new_relic/rack/error_collector.rb:55:in `call'
newrelic_rpm (3.7.3.204) lib/new_relic/rack/agent_hooks.rb:32:in `call'
newrelic_rpm (3.7.3.204) lib/new_relic/rack/browser_monitoring.rb:27:in `call'
newrelic_rpm (3.7.3.204) lib/new_relic/rack/developer_mode.rb:45:in `call'
warden (1.2.3) lib/warden/manager.rb:35:in `block in call'
warden (1.2.3) lib/warden/manager.rb:34:in `catch'
warden (1.2.3) lib/warden/manager.rb:34:in `call'
actionpack (3.2.17) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
rack (1.4.5) lib/rack/etag.rb:23:in `call'
rack (1.4.5) lib/rack/conditionalget.rb:25:in `call'
actionpack (3.2.17) lib/action_dispatch/middleware/head.rb:14:in `call'
actionpack (3.2.17) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
actionpack (3.2.17) lib/action_dispatch/middleware/flash.rb:242:in `call'
rack (1.4.5) lib/rack/session/abstract/id.rb:210:in `context'
rack (1.4.5) lib/rack/session/abstract/id.rb:205:in `call'
actionpack (3.2.17) lib/action_dispatch/middleware/cookies.rb:341:in `call'
activerecord (3.2.17) lib/active_record/query_cache.rb:64:in `call'
activerecord (3.2.17) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
actionpack (3.2.17) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
activesupport (3.2.17) lib/active_support/callbacks.rb:405:in `_run__3105176110586866393__call__3690645254210213224__callbacks'
activesupport (3.2.17) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.17) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
activesupport (3.2.17) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.17) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (3.2.17) lib/action_dispatch/middleware/reloader.rb:65:in `call'
actionpack (3.2.17) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
actionpack (3.2.17) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
actionpack (3.2.17) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
railties (3.2.17) lib/rails/rack/logger.rb:32:in `call_app'
railties (3.2.17) lib/rails/rack/logger.rb:16:in `block in call'
activesupport (3.2.17) lib/active_support/tagged_logging.rb:22:in `tagged'
railties (3.2.17) lib/rails/rack/logger.rb:16:in `call'
actionpack (3.2.17) lib/action_dispatch/middleware/request_id.rb:22:in `call'
rack (1.4.5) lib/rack/methodoverride.rb:21:in `call'
rack (1.4.5) lib/rack/runtime.rb:17:in `call'
activesupport (3.2.17) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
heroku-true-relic (0.1.0) lib/heroku-true-relic/queue_time_logger.rb:29:in `call'
rack (1.4.5) lib/rack/lock.rb:15:in `call'
actionpack (3.2.17) lib/action_dispatch/middleware/static.rb:63:in `call'
runtimeerror_notifier (0.0.19) lib/runtimeerror_notifier/tracker.rb:8:in `call'
railties (3.2.17) lib/rails/engine.rb:484:in `call'
railties (3.2.17) lib/rails/application.rb:231:in `call'
rack (1.4.5) lib/rack/content_length.rb:14:in `call'
railties (3.2.17) lib/rails/rack/log_tailer.rb:17:in `call'
rack (1.4.5) lib/rack/handler/webrick.rb:59:in `service'
/Users/widner/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
/Users/widner/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
/Users/widner/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'

Thanks for any suggestions.

Hi @mikewidner, try clearing your browser cache – it’s not unusual for an old session cookie to cause this kind of issue. Let me know if that helps. Thanks.

Nope. Tried it, same error. The application trace is dying here:

app/controllers/application_controller.rb:10:in `signed_in?'
app/controllers/application_controller.rb:24:in `authenticate'

When I look at that code, it’s checking for the API_CONSUMER environment variable, which I have set in application.yml, but which isn’t in my environment (this is all running on localhost, not Heroku). Given the error about a null value, it suggests to me that the ENV[“API_CONSUMER”] is empty?

That’s plausible. Double check that all of the variables that are in application.sample.yml have values set in your application.yml.

Thanks. I put in dummy values for every value in application.yml (AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY also seem required, but aren’t in the sample) and now it’s running. Huzzah!

Glad to hear it. This should be explicit and reiterated everywhere a developer would think to look when upgrading to a new version. Environment variables are consistenly the most common source of confusion. Thanks for your patience.

While we’re at it, our summer development roadmap is taking shape and I would be glad to share that with you. Might merit a post on this forum actually, so folks know what’s coming.