Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"uninitialized constant Tagteam::ExportImport" on attempting to export a hub #41

Open
zackw opened this issue Nov 27, 2017 · 1 comment

Comments

@zackw
Copy link

zackw commented Nov 27, 2017

Clicking the "download data" button on /export_import produces a 500 error page and I get this in the logs:

A NameError occurred in export_import#download:

  uninitialized constant Tagteam::ExportImport
Did you mean?  ExportImportController
  app/controllers/export_import_controller.rb:11:in `download'


-------------------------------
Request:
-------------------------------

  * URL       : https://iclab-tagteam.cs.umass.edu/export_import/download
  * IP address: 128.237.152.112
  * Parameters: {"controller"=>"export_import", "action"=>"download"}
  * Rails root: /home/tagteam/tagteam
  * Timestamp : 2017-11-27 13:44:48 -0500

-------------------------------
Session:
-------------------------------

  * session id: [FILTERED]
  * data: #<ActionDispatch::Request::Session:0x00555d15256fa8 ...>

-------------------------------
Environment:
-------------------------------

  * HTTPS                                          : on
  * HTTP_ACCEPT                                    : text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  * HTTP_ACCEPT_ENCODING                           : gzip, deflate, br
  * HTTP_ACCEPT_LANGUAGE                           : en-US,en;q=0.5
  * HTTP_COOKIE                                    : [REDACTED]
  * HTTP_DNT                                       : 1
  * HTTP_HOST                                      : iclab-tagteam.cs.umass.edu
  * HTTP_REFERER                                   : https://iclab-tagteam.cs.umass.edu/export_import
  * HTTP_UPGRADE_INSECURE_REQUESTS                 : 1
  * HTTP_USER_AGENT                                : Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0
  * HTTP_VERSION                                   : HTTP/1.1
  * ORIGINAL_FULLPATH                              : /export_import/download
  * ORIGINAL_SCRIPT_NAME                           :
  * PASSENGER_CONNECT_PASSWORD                     : [FILTERED]
  * PATH_INFO                                      : /export_import/download
  * QUERY_STRING                                   :
  * REMOTE_ADDR                                    : 128.237.152.112
  * REMOTE_PORT                                    : 37080
  * REQUEST_METHOD                                 : GET
  * REQUEST_URI                                    : /export_import/download
  * ROUTES_46929117658700_SCRIPT_NAME              :
  * SCRIPT_NAME                                    :
  * SECRET_KEY_BASE                                : [REDACTED]
  * SERVER_NAME                                    : iclab-tagteam.cs.umass.edu
  * SERVER_PORT                                    : 443
  * SERVER_PROTOCOL                                : HTTP/1.1
  * SERVER_SOFTWARE                                : Apache/2.4.25 (Debian) Phusion_Passenger/5.0.30
  * SSL_TLS_SNI                                    : iclab-tagteam.cs.umass.edu
  * action_controller.instance                     : export_import#download
  * action_dispatch.backtrace_cleaner              : #<Rails::BacktraceCleaner:0x00555d101c0f58>
  * action_dispatch.cookies                        : #<ActionDispatch::Cookies::CookieJar:0x00555d15284cf0>
  * action_dispatch.cookies_digest                 :
  * action_dispatch.cookies_serializer             : hybrid
  * action_dispatch.encrypted_cookie_salt          : encrypted cookie
  * action_dispatch.encrypted_signed_cookie_salt   : signed encrypted cookie
  * action_dispatch.http_auth_salt                 : http authentication
  * action_dispatch.key_generator                  : #<ActiveSupport::CachingKeyGenerator:0x00555d12a7e918>
  * action_dispatch.logger                         : #<ActiveSupport::Logger:0x00555d12c08d38>
  * action_dispatch.parameter_filter               : [:password, :password_confirmation, "SHARED_KEY_FOR_TASKS", :password]
  * action_dispatch.redirect_filter                : []
  * action_dispatch.remote_ip                      : 128.237.152.112
  * action_dispatch.request.content_type           :
  * action_dispatch.request.formats                : [#<Mime::Type:0x00555d1282e3c0 @synonyms=["application/xhtml+xml"], @symbol=:html, @string="text/html", @hash=-3952484700252355808>]
  * action_dispatch.request.parameters             : {"controller"=>"export_import", "action"=>"download"}
  * action_dispatch.request.path_parameters        : {:controller=>"export_import", :action=>"download"}
  * action_dispatch.request.query_parameters       : {}
  * action_dispatch.request.request_parameters     : {}
  * action_dispatch.request.unsigned_session_cookie: [REDACTED]
  * action_dispatch.request_id                     : 423b3628-0d22-44ff-90f2-80abab9795dd
  * action_dispatch.routes                         : #<ActionDispatch::Routing::RouteSet:0x00555d12c67c98>
  * action_dispatch.secret_key_base                : [REDACTED]
  * action_dispatch.secret_token                   : [REDACTED]
  * action_dispatch.show_detailed_exceptions       : false
  * action_dispatch.show_exceptions                : true
  * action_dispatch.signed_cookie_salt             : signed cookie
  * exception_notifier.options                     : {:sender_address=>"[email protected]", :exception_recipients=>"[REDACTED]", :email_prefix=>"[tagteam-errors] ", :sections=>["request", "session", "environment", "backtrace"], :background_sections=>["backtrace", "data"], :verbose_subject=>true, :normalize_subject=>false, :ignore_exceptions=>[Acl9::AccessDenied, ActionController::RoutingError, ActiveRecord::RecordNotFound], :ignore_crawlers=>[], :ignore_if=>#<Proc:0x00555d14884c78@/home/tagteam/tagteam/vendor/bundle/ruby/2.3.0/gems/exception_notification-2.6.1/lib/exception_notifier.rb:30 (lambda)>}
  * rack.errors                                    : #<IO:0x00555d0fbd9a90>
  * rack.hijack                                    : #<Proc:0x00555d1526d230@/usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:84 (lambda)>
  * rack.hijack?                                   : true
  * rack.input                                     : #<PhusionPassenger::Utils::TeeInput:0x00555d1526d460>
  * rack.multiprocess                              : true
  * rack.multithread                               : false
  * rack.request.cookie_hash                       : [REDACTED]
  * rack.request.cookie_string                     : [REDACTED]
  * rack.request.query_hash                        : {}
  * rack.request.query_string                      :
  * rack.run_once                                  : false
  * rack.session                                   : #<ActionDispatch::Request::Session:0x00555d15256fa8>
  * rack.session.options                           : #<ActionDispatch::Request::Session::Options:0x00555d15256f58>
  * rack.url_scheme                                : https
  * rack.version                                   : [1, 2]
  * warden                                         : Warden::Proxy:46929137547120 @config={:default_scope=>:user, :scope_defaults=>{}, :default_strategies=>{:user=>[:rememberable, :database_authenticatable]}, :intercept_401=>false, :failure_app=>#<Devise::Delegator:0x00555d10f6f7f8>}
  * Process: 26926
  * Server : iclab-tagteam

-------------------------------
Backtrace:
-------------------------------

  app/controllers/export_import_controller.rb:11:in `download'

A class named Tagteam::ExportImport is defined in lib/tagteam/export_import.rb and I do not understand why it isn't visible here. None of the other code in app/ seems to explicitly "require" or "include" files from lib/. (I do not speak Ruby.)

@zackw
Copy link
Author

zackw commented Nov 27, 2017

Adding

require 'tagteam/export_import'

to the top of app/controllers/export_import_controller.rb is a sufficient workaround. I do not know what a proper fix would be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant