kurenn / sabisu-rails

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

Initializer error #9

Closed olimart closed 8 years ago

olimart commented 10 years ago
rails g sabisu_rails:install
gems/sabisu_rails-0.0.1.pre.beta/lib/sabisu_rails/route_recognizer.rb:14:in `initialize': undefined method `routes' for nil:NilClass (NoMethodError)
kurenn commented 10 years ago

Which version of Rails are you using?

olimart commented 10 years ago

4.1.1

kurenn commented 10 years ago

I just initialize a brand new project with Rails 4, and it worked, can you describe me your flow?

olimart commented 10 years ago
  1. added gem to gemfile
  2. bundle install
  3. run the install command

I noticed that in here https://github.com/IcaliaLabs/sabisu-rails/blob/master/lib/sabisu_rails/version.rb you have 0.0.1-beta but when after installation my gem file includes sabisu_rails (~> 0.0.1.pre.beta)

olimart commented 10 years ago

by chance would you know how to get HTTParty working with Authorization ? http://stackoverflow.com/questions/23617812/httparty-and-authorization-via-token

kurenn commented 10 years ago

Your workflow seems right, can't reproduce it, let me check back here with another computer and I'll be back to you!

What kind of auth with httparty you require?

olimart commented 10 years ago

OK sounds good.

HTTP Token Authentication

kurenn commented 10 years ago

I can't reproduce the error?, maybe you are missing something, what about your Gemfile?

kurenn commented 10 years ago

hey @olimart did you manage to put it together?

olimart commented 10 years ago

Hey, thanks for the follow-up.

I managed to 'copy' gem behaviour into my app. However, I add to switch to unicorn as web server to get 2 workers running (to handle HTTP token). Do you mind taking a look and see if this is the best way to proceed according to your experience with HTTParty?

kurenn commented 10 years ago

Yeah I'll probably upload an example of an api for other devs to try, but I encourage you to use the gem and run your server with foreman, there are plenty of tutorials out there...

For latest changes on the gem use:

gem sabisu_rails, github: 'IcaliaLabs/sabisu-rails'

on your Gemfile