当我运行rails generate graphql:install
时,它会抛出错误,即使我已经安装了gemql graphql和graphql-relay。
这些是错误消息。
Running via Spring preloader in process 64355
Expected boolean default value for '--markerb'; got :erb (string)
Expected string default value for '--test-framework'; got false (boolean)
Expected string default value for '--test-framework'; got false (boolean)
Expected string default value for '--test-framework'; got false (boolean)
Expected string default value for '--helper'; got true (boolean)
Expected string default value for '--assets'; got true (boolean)
Expected string default value for '--test-framework'; got false (boolean)
Expected string default value for '--test-framework'; got false (boolean)
Expected string default value for '--test-framework'; got false (boolean)
Expected string default value for '--test-framework'; got false (boolean)
Expected string default value for '--test-framework'; got false (boolean)
Could not find generator 'graphql:install'. Maybe you meant 'react:install', 'pundit:install' or 'devise:install'
Run `rails generate --help` for more options.
Rails -v 4.2.5 Ruby -v 2.4.0
答案 0 :(得分:2)
看起来这两个宝石彼此不兼容。请按照以下步骤解决此问题。
gem 'graphql-relay'
。Gemfile
bundle install
graphql
的最新版本
Gemfile.lock
最新的graphql版本是否为1.5.2 rails generate graphql:install
干杯