kurenn / sabisu-rails

Simple and powerful engine for exploring your Rails api application
MIT License
127 stars 29 forks source link

No routes created by sabisu #39

Open jrball3 opened 8 years ago

jrball3 commented 8 years ago

I've followed the directions to install and entered in my user model as well as specified by default URI which I have confirmed to be correct many times, and browsing to the following location causes a routing error: No route matches [GET] "/sabisu_rails/explorer"

Under the routes listing below the error the following entry is the first one listed: Helper HTTP Verb Path Controller#action sabisu_rails_path /sabisu_rails SabisuRails::Engine

Notice that there is no HTTP Verb listed. Also, at the bottom of the routes listing, nothing is listed under "Routes for SabisuRails::Engine"

Do I need to add anything to my routes.rb??

It seems like the only thing that "rails generate sabisu_rails:install" did was the following:

J:RailsApp Jon$ rails generate sabisu_rails:install
Running via Spring preloader in process 33069
      create  config/initializers/sabisu_rails.rb
       route  mount SabisuRails::Engine => "/sabisu_rails"

Is this the correct behavior?

Lazarus404 commented 8 years ago

I'm getting this, too. Any help appreciated. routes.rb contains:

mount SabisuRails::Engine => "/sabisu_rails"

but still can't find the route when run.

Lazarus404 commented 8 years ago

Okay, I somehow managed to fix this (or potentially added a bug before it), as I now get:

RoutingError (uninitialized constant SabisuRails::ApplicationController):

Not sure what I did, though. All I did was update the initializer.

kurenn commented 8 years ago

@Lazarus404 The path to view the explorer is /sabisu_rails/explorer

Lazarus404 commented 8 years ago

I actually got this running eventually. I had to hack it, though. It was required that I rename the view sabisu_rails.erb to sabisu.erb and I had to add an application_controller.rb class to the gem itself. It now runs with the latest rails.

kurenn commented 8 years ago

Sweet, maybe you can send a pull request with the fix?

Lazarus404 commented 8 years ago

I also got the spec files from the apionrails book updated to latest rspec, though due to a bug in devise, the checks for 401 fail

Lazarus404 commented 8 years ago

Sure thing