Open Mori opened 7 years ago
i had a same issue!
ActionController::RoutingError (No route matches [GET] "/javascripts/graphiql/rails/application.js"):
Same with Rails 6.0.0.rc1
$ rails s
=> Booting Puma
=> Rails 6.0.0.rc1 application starting in development
=> Run `rails server --help` for more startup options
Puma starting in single mode...
* Version 3.12.1 (ruby 2.6.3-p62), codename: Llamas in Pajamas
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://localhost:3000
Use Ctrl-C to stop
Started GET "/graphiql" for ::1 at 2019-06-05 13:52:00 +0800
(41.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
Processing by GraphiQL::Rails::EditorsController#show as HTML
Parameters: {"graphql_path"=>"/graphql"}
Rendering /Users/<snipped>/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/graphiql-rails-1.7.0/app/views/graphiql/rails/editors/show.html.erb
Rendered /Users/<snipped>/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/graphiql-rails-1.7.0/app/views/graphiql/rails/editors/show.html.erb (Duration: 28.6ms | Allocations: 852)
Completed 200 OK in 44ms (Views: 38.1ms | ActiveRecord: 0.0ms | Allocations: 2572)
Started GET "/stylesheets/graphiql/rails/application.css" for ::1 at 2019-06-05 13:52:00 +0800
Started GET "/javascripts/graphiql/rails/application.js" for ::1 at 2019-06-05 13:52:00 +0800
ActionController::RoutingError (No route matches [GET] "/stylesheets/graphiql/rails/application.css"):
EDIT: My issue was I had require 'sprockets/railtie'
commented out in config/application.rb
. Uncommenting it fixed the issue for me.
Same issue with Rails 7.0.2, but the solution @alphabt suggested fix it for me.
@htmlboss please check this link, following the steps mentioned here solved my problem.
This issue looks like a zombie of #13 (Assets are not accessible in API-only app), which was closed a year ago. I followed the advice of jam35L in that issue with no effect. Here is the log output:
I tried running
rake assets:precompile
, and also tried copying the app/assets/ folder into my Rails app and then runningrake assets:precompile
. These didn't have an effect. I also tried copying the javascripts/ and stylesheets folders into my app's public/ folder. This prevents theRoute could not be found
error, but the page never loads. Should I try moving the whole engine into my app?I'm constrained to use Rails 3.2 in this app, is that a known problem? I do have a minimal working graphql endpoint at /queries/admin, tested with curl. Any suggestions beyond those in issue #13?
Thanks!