jetruby / apollo_upload_server-ruby

MIT License
180 stars 50 forks source link

uninitialized constant ApolloUploadServer::GraphQL #4

Closed RasmusHaarslev closed 6 years ago

RasmusHaarslev commented 6 years ago

I installed the gem by adding it to my gemfile and ran bundler as per the README. When starting the server I get the following error message:

/usr/share/rvm/rubies/ruby-2.4.1/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /home/rasmus/Documents/statum/API/bin/rails server -b 0.0.0.0 -p 3001 -e development
/home/rasmus/.rvm/gems/ruby-2.4.1/gems/bundler-1.16.1/lib/bundler/runtime.rb:84:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'apollo_upload_server'. (Bundler::GemRequireError)
Gem Load Error is: uninitialized constant ApolloUploadServer::GraphQL
Backtrace for gem load error is:
/home/rasmus/.rvm/gems/ruby-2.4.1/gems/apollo_upload_server-2.0.0.alpha.2/lib/apollo_upload_server/upload.rb:2:in `<module:ApolloUploadServer>'
/home/rasmus/.rvm/gems/ruby-2.4.1/gems/apollo_upload_server-2.0.0.alpha.2/lib/apollo_upload_server/upload.rb:1:in `<top (required)>'
/home/rasmus/.rvm/gems/ruby-2.4.1/gems/apollo_upload_server-2.0.0.alpha.2/lib/apollo_upload_server.rb:5:in `require'
/home/rasmus/.rvm/gems/ruby-2.4.1/gems/apollo_upload_server-2.0.0.alpha.2/lib/apollo_upload_server.rb:5:in `<top (required)>'
/home/rasmus/.rvm/gems/ruby-2.4.1/gems/bundler-1.16.1/lib/bundler/runtime.rb:81:in `require'
/home/rasmus/.rvm/gems/ruby-2.4.1/gems/bundler-1.16.1/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
/home/rasmus/.rvm/gems/ruby-2.4.1/gems/bundler-1.16.1/lib/bundler/runtime.rb:76:in `each'
/home/rasmus/.rvm/gems/ruby-2.4.1/gems/bundler-1.16.1/lib/bundler/runtime.rb:76:in `block in require'
/home/rasmus/.rvm/gems/ruby-2.4.1/gems/bundler-1.16.1/lib/bundler/runtime.rb:65:in `each'
/home/rasmus/.rvm/gems/ruby-2.4.1/gems/bundler-1.16.1/lib/bundler/runtime.rb:65:in `require'
/home/rasmus/.rvm/gems/ruby-2.4.1/gems/bundler-1.16.1/lib/bundler.rb:114:in `require'
/home/rasmus/Documents/statum/API/config/application.rb:19:in `<top (required)>'
/home/rasmus/.rvm/gems/ruby-2.4.1/gems/railties-5.0.6/lib/rails/commands/commands_tasks.rb:88:in `require'
/home/rasmus/.rvm/gems/ruby-2.4.1/gems/railties-5.0.6/lib/rails/commands/commands_tasks.rb:88:in `block in server'
/home/rasmus/.rvm/gems/ruby-2.4.1/gems/railties-5.0.6/lib/rails/commands/commands_tasks.rb:85:in `tap'
/home/rasmus/.rvm/gems/ruby-2.4.1/gems/railties-5.0.6/lib/rails/commands/commands_tasks.rb:85:in `server'
/home/rasmus/.rvm/gems/ruby-2.4.1/gems/railties-5.0.6/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
/home/rasmus/.rvm/gems/ruby-2.4.1/gems/railties-5.0.6/lib/rails/commands.rb:18:in `<top (required)>'
/home/rasmus/Documents/statum/API/bin/rails:9:in `require'
/home/rasmus/Documents/statum/API/bin/rails:9:in `<top (required)>'
/home/rasmus/.rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
/home/rasmus/.rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
/home/rasmus/.rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
/home/rasmus/.rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
/home/rasmus/.rvm/gems/ruby-2.4.1/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
/home/rasmus/.rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
/home/rasmus/.rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
/usr/share/rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:68:in `require'
/usr/share/rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:68:in `require'
/home/rasmus/Documents/statum/API/bin/spring:14:in `<top (required)>'
/home/rasmus/Documents/statum/API/bin/rails:3:in `load'
/home/rasmus/Documents/statum/API/bin/rails:3:in `<top (required)>'
-e:1:in `load'
-e:1:in `<main>'
Bundler Error Backtrace:
    from /home/rasmus/.rvm/gems/ruby-2.4.1/gems/bundler-1.16.1/lib/bundler/runtime.rb:80:in `block (2 levels) in require'
    from /home/rasmus/.rvm/gems/ruby-2.4.1/gems/bundler-1.16.1/lib/bundler/runtime.rb:76:in `each'
    from /home/rasmus/.rvm/gems/ruby-2.4.1/gems/bundler-1.16.1/lib/bundler/runtime.rb:76:in `block in require'
    from /home/rasmus/.rvm/gems/ruby-2.4.1/gems/bundler-1.16.1/lib/bundler/runtime.rb:65:in `each'
    from /home/rasmus/.rvm/gems/ruby-2.4.1/gems/bundler-1.16.1/lib/bundler/runtime.rb:65:in `require'
    from /home/rasmus/.rvm/gems/ruby-2.4.1/gems/bundler-1.16.1/lib/bundler.rb:114:in `require'
    from /home/rasmus/Documents/statum/API/config/application.rb:19:in `<top (required)>'
    from /home/rasmus/.rvm/gems/ruby-2.4.1/gems/railties-5.0.6/lib/rails/commands/commands_tasks.rb:88:in `require'
    from /home/rasmus/.rvm/gems/ruby-2.4.1/gems/railties-5.0.6/lib/rails/commands/commands_tasks.rb:88:in `block in server'
    from /home/rasmus/.rvm/gems/ruby-2.4.1/gems/railties-5.0.6/lib/rails/commands/commands_tasks.rb:85:in `tap'
    from /home/rasmus/.rvm/gems/ruby-2.4.1/gems/railties-5.0.6/lib/rails/commands/commands_tasks.rb:85:in `server'
    from /home/rasmus/.rvm/gems/ruby-2.4.1/gems/railties-5.0.6/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
    from /home/rasmus/.rvm/gems/ruby-2.4.1/gems/railties-5.0.6/lib/rails/commands.rb:18:in `<top (required)>'
    from /home/rasmus/Documents/statum/API/bin/rails:9:in `require'
    from /home/rasmus/Documents/statum/API/bin/rails:9:in `<top (required)>'
    from /home/rasmus/.rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
    from /home/rasmus/.rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
    from /home/rasmus/.rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
    from /home/rasmus/.rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
    from /home/rasmus/.rvm/gems/ruby-2.4.1/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
    from /home/rasmus/.rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
    from /home/rasmus/.rvm/gems/ruby-2.4.1/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
    from /usr/share/rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:68:in `require'
    from /usr/share/rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:68:in `require'
    from /home/rasmus/Documents/statum/API/bin/spring:14:in `<top (required)>'
    from /home/rasmus/Documents/statum/API/bin/rails:3:in `load'
    from /home/rasmus/Documents/statum/API/bin/rails:3:in `<top (required)>'
    from -e:1:in `load'
    from -e:1:in `<main>'

Process finished with exit code 1

I'm running

ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]

with the following gems:

Gems included by the bundle:
  * actioncable (5.0.6)
  * actionmailer (5.0.6)
  * actionpack (5.0.6)
  * actionview (5.0.6)
  * activejob (5.0.6)
  * activemodel (5.0.6)
  * activerecord (5.0.6)
  * activesupport (5.0.6)
  * addressable (2.5.2)
  * analytics-ruby (2.0.13)
  * apollo_upload_server (2.0.0.alpha.2)
  * arel (7.1.4)
  * ast (2.4.0)
  * aws-partitions (1.61.0)
  * aws-sdk (3.0.1)
  * aws-sdk-acm (1.3.0)
  * aws-sdk-alexaforbusiness (1.1.0)
  * aws-sdk-apigateway (1.9.0)
  * aws-sdk-applicationautoscaling (1.7.0)
  * aws-sdk-applicationdiscoveryservice (1.1.0)
  * aws-sdk-appstream (1.5.0)
  * aws-sdk-appsync (1.0.0)
  * aws-sdk-athena (1.0.0)
  * aws-sdk-autoscaling (1.4.0)
  * aws-sdk-autoscalingplans (1.1.0)
  * aws-sdk-batch (1.3.0)
  * aws-sdk-budgets (1.5.0)
  * aws-sdk-cloud9 (1.1.0)
  * aws-sdk-clouddirectory (1.1.0)
  * aws-sdk-cloudformation (1.3.0)
  * aws-sdk-cloudfront (1.1.0)
  * aws-sdk-cloudhsm (1.3.0)
  * aws-sdk-cloudhsmv2 (1.1.0)
  * aws-sdk-cloudsearch (1.0.0)
  * aws-sdk-cloudsearchdomain (1.0.0)
  * aws-sdk-cloudtrail (1.0.0)
  * aws-sdk-cloudwatch (1.4.0)
  * aws-sdk-cloudwatchevents (1.1.0)
  * aws-sdk-cloudwatchlogs (1.2.0)
  * aws-sdk-codebuild (1.6.0)
  * aws-sdk-codecommit (1.2.0)
  * aws-sdk-codedeploy (1.3.0)
  * aws-sdk-codepipeline (1.1.0)
  * aws-sdk-codestar (1.1.0)
  * aws-sdk-cognitoidentity (1.0.0)
  * aws-sdk-cognitoidentityprovider (1.3.0)
  * aws-sdk-cognitosync (1.0.0)
  * aws-sdk-comprehend (1.0.0)
  * aws-sdk-configservice (1.5.0)
  * aws-sdk-core (3.15.0)
  * aws-sdk-costandusagereportservice (1.0.0)
  * aws-sdk-costexplorer (1.0.0)
  * aws-sdk-databasemigrationservice (1.4.0)
  * aws-sdk-datapipeline (1.0.0)
  * aws-sdk-dax (1.0.0)
  * aws-sdk-devicefarm (1.3.0)
  * aws-sdk-directconnect (1.1.0)
  * aws-sdk-directoryservice (1.1.0)
  * aws-sdk-dynamodb (1.4.0)
  * aws-sdk-dynamodbstreams (1.0.0)
  * aws-sdk-ec2 (1.27.0)
  * aws-sdk-ecr (1.2.0)
  * aws-sdk-ecs (1.8.0)
  * aws-sdk-efs (1.0.0)
  * aws-sdk-elasticache (1.3.0)
  * aws-sdk-elasticbeanstalk (1.3.0)
  * aws-sdk-elasticloadbalancing (1.2.0)
  * aws-sdk-elasticloadbalancingv2 (1.7.0)
  * aws-sdk-elasticsearchservice (1.3.0)
  * aws-sdk-elastictranscoder (1.0.0)
  * aws-sdk-emr (1.1.0)
  * aws-sdk-firehose (1.1.0)
  * aws-sdk-gamelift (1.2.0)
  * aws-sdk-glacier (1.6.0)
  * aws-sdk-glue (1.5.0)
  * aws-sdk-greengrass (1.2.0)
  * aws-sdk-guardduty (1.2.0)
  * aws-sdk-health (1.0.0)
  * aws-sdk-iam (1.3.0)
  * aws-sdk-importexport (1.0.0)
  * aws-sdk-inspector (1.3.0)
  * aws-sdk-iot (1.3.0)
  * aws-sdk-iotdataplane (1.0.0)
  * aws-sdk-iotjobsdataplane (1.0.0)
  * aws-sdk-kinesis (1.2.0)
  * aws-sdk-kinesisanalytics (1.2.0)
  * aws-sdk-kinesisvideo (1.0.0)
  * aws-sdk-kinesisvideoarchivedmedia (1.0.0)
  * aws-sdk-kinesisvideomedia (1.0.0)
  * aws-sdk-kms (1.5.0)
  * aws-sdk-lambda (1.4.0)
  * aws-sdk-lambdapreview (1.0.0)
  * aws-sdk-lex (1.3.0)
  * aws-sdk-lexmodelbuildingservice (1.4.0)
  * aws-sdk-lightsail (1.3.0)
  * aws-sdk-machinelearning (1.0.0)
  * aws-sdk-marketplacecommerceanalytics (1.0.0)
  * aws-sdk-marketplaceentitlementservice (1.0.0)
  * aws-sdk-marketplacemetering (1.0.0)
  * aws-sdk-mediaconvert (1.0.0)
  * aws-sdk-medialive (1.2.0)
  * aws-sdk-mediapackage (1.0.0)
  * aws-sdk-mediastore (1.1.0)
  * aws-sdk-mediastoredata (1.1.0)
  * aws-sdk-migrationhub (1.0.0)
  * aws-sdk-mobile (1.0.0)
  * aws-sdk-mq (1.0.0)
  * aws-sdk-mturk (1.2.0)
  * aws-sdk-opsworks (1.2.0)
  * aws-sdk-opsworkscm (1.2.0)
  * aws-sdk-organizations (1.7.0)
  * aws-sdk-pinpoint (1.2.0)
  * aws-sdk-polly (1.4.0)
  * aws-sdk-pricing (1.0.0)
  * aws-sdk-rds (1.12.0)
  * aws-sdk-redshift (1.1.0)
  * aws-sdk-rekognition (1.2.0)
  * aws-sdk-resourcegroups (1.0.0)
  * aws-sdk-resourcegroupstaggingapi (1.0.0)
  * aws-sdk-resources (3.12.0)
  * aws-sdk-route53 (1.8.0)
  * aws-sdk-route53domains (1.1.0)
  * aws-sdk-s3 (1.8.0)
  * aws-sdk-sagemaker (1.5.0)
  * aws-sdk-sagemakerruntime (1.0.0)
  * aws-sdk-serverlessapplicationrepository (1.0.0)
  * aws-sdk-servicecatalog (1.3.0)
  * aws-sdk-servicediscovery (1.1.0)
  * aws-sdk-ses (1.6.0)
  * aws-sdk-shield (1.1.0)
  * aws-sdk-simpledb (1.0.0)
  * aws-sdk-sms (1.0.0)
  * aws-sdk-snowball (1.2.0)
  * aws-sdk-sns (1.1.0)
  * aws-sdk-sqs (1.3.0)
  * aws-sdk-ssm (1.7.0)
  * aws-sdk-states (1.2.0)
  * aws-sdk-storagegateway (1.2.0)
  * aws-sdk-support (1.0.0)
  * aws-sdk-swf (1.0.0)
  * aws-sdk-transcribeservice (1.0.0)
  * aws-sdk-translate (1.0.0)
  * aws-sdk-waf (1.3.0)
  * aws-sdk-wafregional (1.3.0)
  * aws-sdk-workdocs (1.1.0)
  * aws-sdk-workmail (1.0.0)
  * aws-sdk-workspaces (1.1.0)
  * aws-sdk-xray (1.1.0)
  * aws-sigv2 (1.0.1)
  * aws-sigv4 (1.0.2)
  * bcrypt (3.1.11)
  * bindex (0.5.0)
  * builder (3.2.3)
  * bullet (5.7.2)
  * bundler (1.16.1)
  * byebug (10.0.0)
  * callsite (0.0.11)
  * capybara (2.18.0)
  * choice (0.2.0)
  * climate_control (0.2.0)
  * cocaine (0.5.8)
  * coderay (1.1.2)
  * coffee-rails (4.2.2)
  * coffee-script (2.4.1)
  * coffee-script-source (1.12.2)
  * concurrent-ruby (1.0.5)
  * crack (0.4.3)
  * crass (1.0.3)
  * css_parser (1.6.0)
  * database_cleaner (1.6.2)
  * devise (4.4.1)
  * diff-lcs (1.3)
  * discard (0.2.0)
  * docile (1.1.5)
  * erubis (2.7.0)
  * execjs (2.7.0)
  * factory_bot (4.8.2)
  * factory_bot_rails (4.8.2)
  * faraday (0.12.2)
  * ffi (1.9.21)
  * formatador (0.2.5)
  * foundation_emails (2.2.1.0)
  * globalid (0.4.1)
  * google_maps_service (0.4.2)
  * graphiql-rails (1.4.8)
  * graphql (1.7.12)
  * graphql-errors (0.1.0)
  * graphql-query-resolver (0.2.0)
  * guard (2.14.2)
  * guard-compat (1.2.1)
  * guard-rspec (4.7.3)
  * hashdiff (0.3.7)
  * hashie (3.5.7)
  * htmlentities (4.3.4)
  * httparty (0.16.0)
  * hubspot-ruby (0.4.0)
  * hurley (0.2)
  * i18n (0.9.5)
  * inky-rb (1.3.7.2)
  * jbuilder (2.7.0)
  * jmespath (1.3.1)
  * jquery-rails (4.3.1)
  * json (2.1.0)
  * jwt (1.5.6)
  * launchy (2.4.3)
  * letter_opener (1.6.0)
  * letter_opener_web (1.3.3)
  * linkedin-oauth2 (1.0.0)
  * listen (3.0.8)
  * lograge (0.9.0)
  * loofah (2.2.0)
  * lumberjack (1.0.12)
  * mail (2.7.0)
  * meta_request (0.5.0)
  * method_source (0.9.0)
  * mime-types (3.1)
  * mime-types-data (3.2016.0521)
  * mimemagic (0.3.2)
  * mini_mime (1.0.0)
  * mini_portile2 (2.3.0)
  * minitest (5.11.3)
  * multi_json (1.13.1)
  * multi_xml (0.6.0)
  * multipart-post (2.0.0)
  * nenv (0.3.0)
  * nio4r (2.2.0)
  * nokogiri (1.8.2)
  * notiffany (0.1.1)
  * oauth2 (1.4.0)
  * orm_adapter (0.5.0)
  * paperclip (5.0.0)
  * parallel (1.12.1)
  * parser (2.4.0.2)
  * pg (0.21.0)
  * powerpack (0.1.1)
  * premailer (1.11.1)
  * premailer-rails (1.10.1)
  * pry (0.11.3)
  * public_suffix (3.0.2)
  * puma (3.11.2)
  * pundit (1.1.0)
  * pundit-matchers (1.4.1)
  * rack (2.0.4)
  * rack-contrib (2.0.1)
  * rack-cors (1.0.2)
  * rack-rewrite (1.5.1)
  * rack-test (0.6.3)
  * rails (5.0.6)
  * rails-controller-testing (1.0.2)
  * rails-dom-testing (2.0.3)
  * rails-erd (1.5.2)
  * rails-html-sanitizer (1.0.3)
  * railties (5.0.6)
  * rainbow (3.0.0)
  * rake (12.3.0)
  * rb-fsevent (0.10.2)
  * rb-inotify (0.9.10)
  * redis (4.0.1)
  * redis-actionpack (5.0.2)
  * redis-activesupport (5.0.4)
  * redis-rack (2.0.4)
  * redis-rails (5.0.2)
  * redis-store (1.4.1)
  * request_store (1.4.0)
  * responders (2.4.0)
  * retriable (2.1.0)
  * rspec (3.7.0)
  * rspec-core (3.7.1)
  * rspec-expectations (3.7.0)
  * rspec-graphql_matchers (0.7.1)
  * rspec-mocks (3.7.0)
  * rspec-rails (3.7.2)
  * rspec-support (3.7.1)
  * rubocop (0.52.1)
  * ruby-graphviz (1.2.3)
  * ruby-prof (0.17.0)
  * ruby-progressbar (1.9.0)
  * safe_yaml (1.0.4)
  * sass (3.5.5)
  * sass-listen (4.0.0)
  * sass-rails (5.0.7)
  * search_object (1.2.0)
  * search_object_graphql (0.1)
  * sentry-raven (2.7.2)
  * shellany (0.0.1)
  * shoulda-matchers (3.1.2)
  * simplecov (0.15.1)
  * simplecov-html (0.10.2)
  * spawnling (2.1.6)
  * spring (2.0.2)
  * spring-commands-rspec (1.0.4)
  * spring-watcher-listen (2.0.1)
  * sprockets (3.7.1)
  * sprockets-rails (3.2.1)
  * stripe (3.9.2)
  * thor (0.20.0)
  * thread_safe (0.3.6)
  * tilt (2.0.8)
  * turbolinks (5.1.0)
  * turbolinks-source (5.1.0)
  * tzinfo (1.2.5)
  * uglifier (4.1.6)
  * unicode-display_width (1.3.0)
  * uniform_notifier (1.11.0)
  * vcr (4.0.0)
  * warden (1.2.7)
  * web-console (3.5.1)
  * webmock (3.3.0)
  * websocket-driver (0.6.5)
  * websocket-extensions (0.1.3)
  * wisper (2.0.0)
  * xpath (3.0.0)
fuelen commented 6 years ago

Hi @RasmusHaarslev! Probably we forgot to add require 'graphql' to lib/apollo_upload_server/upload.rb file. Try to put graphql before apollo_upload_server in your Gemfile

RasmusHaarslev commented 6 years ago

@fuelen That worked indeed!

Unless you're doing it now, I'll make a PR to fix it. (It's my first time interacting with an open source project, so it's a learning experience even though it's simple! :+1: )

fuelen commented 6 years ago

@RasmusHaarslev fix is already in 2.0.0.alpha.3