Originally created by @anga on GitHub (Apr 22, 2019).
I'm using graphql gem on my app and when I try to start crono, it fails with uninitialized constant GraphQL::Batch exception:
I tried to load manually the environment.rb file on config/cronotab.rb, but it fails before reach the file. I alsto tried running rails crono:check but all is ok. No other rails command fails so far (that I tried, like rails server, rails console, etc`). I don't know where to look at.
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '~> 2.6.0'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.2'
# Use sqlite3 as the database for Active Record
#gem 'sqlite3'
gem 'pg'
gem 'mongoid', '~> 7.0'
# Use Puma as the app server
gem 'puma', '~> 3.11'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
# gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
gem 'redis', '~> 4.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use ActiveStorage variant
# gem 'mini_magick', '~> 4.8'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Speedup bson objects, heavely used by MondoID
gem 'bson_ext'
gem 'devise'
gem 'rest-client'
# Permissions
gem 'cancancan', '~> 2.0'
gem 'rolify', '5.2'
# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.1.0', require: false
# GraphQL. To be able to query graphql queries
gem 'graphql', '~> 1.9'
# Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible
gem 'rack-cors'
# Scheduled jobs
gem 'daemons'
gem 'crono', '~> 1.1'
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
gem 'dotenv-rails'
gem 'rspec-rails', '~> 3.8'
gem 'database_cleaner', '~> 1.7'
# Ex FactoryGirl. A fixture gem
gem 'factory_bot_rails'
# Fake many kind of values, like names, emails, phone numbers, and a long list
gem 'faker'
# For spacemacs
gem 'pry'
gem 'pry-doc'
gem 'method_source'
end
group :development do
gem 'listen', '>= 3.0.5', '< 3.2'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
NOTE: everything is running inside docker, that is why /url/local/...
I'm sure that I may be doing something wrong.
Thanks in advance.
Originally created by @anga on GitHub (Apr 22, 2019).
I'm using graphql gem on my app and when I try to start crono, it fails with `uninitialized constant GraphQL::Batch` exception:
I tried to load manually the environment.rb file on `config/cronotab.rb`, but it fails before reach the file. I alsto tried running `rails crono:check` but all is ok. No other rails command fails so far (that I tried, like `rails server`, `rails console`, etc`). I don't know where to look at.
Any help is really welcomed
cli:
``` [sh]
bundle exec crono -e development start
```
config/cronotab.rb
``` [ruby]
# coding: utf-8
# frozen_string_literal: true
Crono.perform(UpdateMachinesStatusJob).every 1.minute
```
Gemfile
``` [ruby]
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '~> 2.6.0'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.2'
# Use sqlite3 as the database for Active Record
#gem 'sqlite3'
gem 'pg'
gem 'mongoid', '~> 7.0'
# Use Puma as the app server
gem 'puma', '~> 3.11'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
# gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
gem 'redis', '~> 4.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use ActiveStorage variant
# gem 'mini_magick', '~> 4.8'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Speedup bson objects, heavely used by MondoID
gem 'bson_ext'
gem 'devise'
gem 'rest-client'
# Permissions
gem 'cancancan', '~> 2.0'
gem 'rolify', '5.2'
# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.1.0', require: false
# GraphQL. To be able to query graphql queries
gem 'graphql', '~> 1.9'
# Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible
gem 'rack-cors'
# Scheduled jobs
gem 'daemons'
gem 'crono', '~> 1.1'
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
gem 'dotenv-rails'
gem 'rspec-rails', '~> 3.8'
gem 'database_cleaner', '~> 1.7'
# Ex FactoryGirl. A fixture gem
gem 'factory_bot_rails'
# Fake many kind of values, like names, emails, phone numbers, and a long list
gem 'faker'
# For spacemacs
gem 'pry'
gem 'pry-doc'
gem 'method_source'
end
group :development do
gem 'listen', '>= 3.0.5', '< 3.2'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
```
Exception:
```
uninitialized constant GraphQL::Batch
/usr/local/bundle/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/active_support.rb:76:in `block in load_missing_constant'
/usr/local/bundle/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/active_support.rb:8:in `without_bootsnap_cache'
/usr/local/bundle/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/active_support.rb:76:in `rescue in load_missing_constant'
/usr/local/bundle/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/active_support.rb:58:in `load_missing_constant'
/myapp/app/graphql/loaders/infinibay_api.rb:2:in `<module:Loaders>'
/myapp/app/graphql/loaders/infinibay_api.rb:1:in `<main>'
/usr/local/bundle/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:50:in `load'
/usr/local/bundle/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:50:in `load'
/usr/local/bundle/gems/activesupport-5.2.2.1/lib/active_support/dependencies/interlock.rb:14:in `block in loading'
/usr/local/bundle/gems/activesupport-5.2.2.1/lib/active_support/concurrency/share_lock.rb:151:in `exclusive'
/usr/local/bundle/gems/activesupport-5.2.2.1/lib/active_support/dependencies/interlock.rb:13:in `loading'
/usr/local/bundle/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/active_support.rb:48:in `block in require_or_load'
/usr/local/bundle/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/active_support.rb:16:in `allow_bootsnap_retry'
/usr/local/bundle/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/active_support.rb:47:in `require_or_load'
/usr/local/bundle/gems/bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/active_support.rb:82:in `depend_on'
/usr/local/bundle/gems/railties-5.2.2.1/lib/rails/engine.rb:478:in `block (2 levels) in eager_load!'
/usr/local/bundle/gems/railties-5.2.2.1/lib/rails/engine.rb:477:in `each'
/usr/local/bundle/gems/railties-5.2.2.1/lib/rails/engine.rb:477:in `block in eager_load!'
/usr/local/bundle/gems/railties-5.2.2.1/lib/rails/engine.rb:475:in `each'
/usr/local/bundle/gems/railties-5.2.2.1/lib/rails/engine.rb:475:in `eager_load!'
/usr/local/bundle/gems/crono-1.1.2/lib/crono/cli.rb:93:in `load_rails'
/usr/local/bundle/gems/crono-1.1.2/lib/crono/cli.rb:28:in `run'
/usr/local/bundle/gems/crono-1.1.2/exe/crono:8:in `<top (required)>'
/usr/local/bundle/bin/crono:23:in `load'
/usr/local/bundle/bin/crono:23:in `<top (required)>'
/usr/local/lib/ruby/2.6.0/bundler/cli/exec.rb:74:in `load'
/usr/local/lib/ruby/2.6.0/bundler/cli/exec.rb:74:in `kernel_load'
/usr/local/lib/ruby/2.6.0/bundler/cli/exec.rb:28:in `run'
/usr/local/lib/ruby/2.6.0/bundler/cli.rb:463:in `exec'
/usr/local/lib/ruby/2.6.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/lib/ruby/2.6.0/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/usr/local/lib/ruby/2.6.0/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/usr/local/lib/ruby/2.6.0/bundler/cli.rb:27:in `dispatch'
/usr/local/lib/ruby/2.6.0/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/usr/local/lib/ruby/2.6.0/bundler/cli.rb:18:in `start'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-1.17.2/exe/bundle:30:in `block in <top (required)>'
/usr/local/lib/ruby/2.6.0/bundler/friendly_errors.rb:124:in `with_friendly_errors'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-1.17.2/exe/bundle:22:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
```
NOTE: everything is running inside docker, that is why `/url/local/...`
I'm sure that I may be doing something wrong.
Thanks in advance.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @anga on GitHub (Apr 22, 2019).
I'm using graphql gem on my app and when I try to start crono, it fails with
uninitialized constant GraphQL::Batchexception:I tried to load manually the environment.rb file on
config/cronotab.rb, but it fails before reach the file. I alsto tried runningrails crono:checkbut all is ok. No other rails command fails so far (that I tried, likerails server,rails console, etc`). I don't know where to look at.Any help is really welcomed
cli:
config/cronotab.rb
Gemfile
Exception:
NOTE: everything is running inside docker, that is why
/url/local/...I'm sure that I may be doing something wrong.
Thanks in advance.
@anga commented on GitHub (Apr 22, 2019):
Not a
ceronoissue. Looks like agraphql-rubyissue. Sorry for the post