Closed camkidman closed 8 years ago
I could not reproduce, this is my Gemfile, the only difference basically is I'm using version 1.5 from furatto
and removed the compass-rails
dependency as is already included in the furatto newest version:
source "https://rubygems.org"
ruby "2.2.3"
gem "versionist"
gem "active_model_serializers", github: "rails-api/active_model_serializers", branch: "0-8-stable"
gem 'sabisu_rails', github: "IcaliaLabs/sabisu-rails"
gem 'furatto', "~> 1.5"
gem 'font-awesome-rails'
gem 'simple_form'
gem "rails", "4.2.1"
gem "jquery-rails"
gem "pg"
gem "sass-rails", "~> 5.0"
gem "coffee-rails", "~> 4.1.0"
gem "uglifier", ">= 1.3.0"
gem "puma"
group :development do
gem "spring"
gem "spring-commands-rspec"
gem "web-console"
end
group :development, :test do
gem "awesome_print"
gem "factory_girl_rails"
gem "pry-rails"
gem "rspec-rails", "~> 3.1.0"
gem "ffaker"
end
# Test gems
group :test do
gem "database_cleaner"
gem "shoulda-matchers"
end
# Production and staging gems
group :production, :staging do
gem "rails_12factor"
gem "exception_notification"
end
I'm having this same issue. I also tried matching your gemfile, with a bundle update, and didn't work. I sent you a tweet with image of error.
If you are following the api's on rails tutorial, you can skip the sabisu integration with no problem! just so you don't stop learning, I'll take a look at this in the meantime
the gem rails-api
is not including ActionView::Layout
in the ActionController::API
. @kurenn , it looks like another difference between your Gemfile and @camkidman 's is that they are using the rails-api
gem. I'm having the same issue and if I include ActionView::Layout
inside of the BaseController
of this gem, then I seem to be getting rid of the this specific error. Now I'm getting a page that tells me I need to log in first.
@jakehockey10 for the admin section you can access with the following credentials:
username: admin
password: sekret
Thanks :-)
Seems like that's the fix for it @jakehockey10 -- Maybe explicitly making ActionView::Layout
a dependency for this gem would clear up some of the confusion for those using rails-api
? I'm not sure if it's relevant pending the inclusion of rails-api into Rails 5, though
I just gave up and started using Postman. Sorry. :(
Sent from my iPhone
On Dec 17, 2015, at 3:16 PM, Cameron Kidman notifications@github.com<mailto:notifications@github.com> wrote:
Seems like that's the fix for it @jakehockey10https://github.com/jakehockey10 -- Maybe explicitly making ActionView::Layout a dependency for this gem would clear up some of the confusion for those using rails-api? I'm not sure if it's relevant pending the inclusion of rails-api into Rails 5, thoughhttps://github.com/rails/rails/pull/19832
— Reply to this email directly or view it on GitHubhttps://github.com/IcaliaLabs/sabisu-rails/issues/36#issuecomment-165570848.
add this to your application controller include ActionView::Layouts
There's a workaround for this issue, closing.
Trying to use sabisu-rails for my API that I'm building and, upon following the readme, the very first thing I'm presented with is
undefined method 'layout' for SabisuRails::BaseController:Class
Gemfile
initializers/sabisu-rails.rb
Full stack trace: