solidusio / solidus_auth_devise

🔑 Devise authentication for your Solidus store.
http://solidus.io
BSD 3-Clause "New" or "Revised" License
52 stars 124 forks source link

Requiring gem, on API only projects, throws LoadError (sass/rails) #88

Closed gbrlcustodio closed 5 years ago

gbrlcustodio commented 7 years ago

Requiring this gem on Rails 5 API only projects throws LoadError.

Steps to reproduce

  1. Create a Rails 5 API only project rails new store --api
  2. Add solidus_auth_device to Gemfile and install it
  3. run any rake tasks. Like rake db:create

output

rails aborted!
LoadError: cannot load such file -- sass/rails
/home/gabriel/.rvm/gems/ruby-2.3.0/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:293:in `require'
/home/gabriel/.rvm/gems/ruby-2.3.0/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:293:in `block in require'
/home/gabriel/.rvm/gems/ruby-2.3.0/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:259:in `load_dependency'
/home/gabriel/.rvm/gems/ruby-2.3.0/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:293:in `require'
/home/gabriel/.rvm/gems/ruby-2.3.0/gems/solidus_auth_devise-1.6.2/lib/solidus_auth_devise.rb:4:in `<top (required)>'
/home/gabriel/.rvm/gems/ruby-2.3.0/gems/bundler-1.14.3/lib/bundler/runtime.rb:91:in `require'
/home/gabriel/.rvm/gems/ruby-2.3.0/gems/bundler-1.14.3/lib/bundler/runtime.rb:91:in `block (2 levels) in require'
/home/gabriel/.rvm/gems/ruby-2.3.0/gems/bundler-1.14.3/lib/bundler/runtime.rb:86:in `each'
/home/gabriel/.rvm/gems/ruby-2.3.0/gems/bundler-1.14.3/lib/bundler/runtime.rb:86:in `block in require'
/home/gabriel/.rvm/gems/ruby-2.3.0/gems/bundler-1.14.3/lib/bundler/runtime.rb:75:in `each'
/home/gabriel/.rvm/gems/ruby-2.3.0/gems/bundler-1.14.3/lib/bundler/runtime.rb:75:in `require'
/home/gabriel/.rvm/gems/ruby-2.3.0/gems/bundler-1.14.3/lib/bundler.rb:107:in `require'
/home/gabriel/Projects/suppl-api/config/application.rb:17:in `<top (required)>'
/home/gabriel/Projects/suppl-api/Rakefile:4:in `require_relative'
/home/gabriel/Projects/suppl-api/Rakefile:4:in `<top (required)>'
...

Gems verion

stewart commented 7 years ago

Hi @gcmartins93 - thanks for bringing this to our attention. This error in particular is caused by some unnecessary require statements that weren't removed in earlier cleanups.

I've drafted up a PR that removes them.

However, further progress on developing Solidus apps built on API-only applications is currently blocked by use of the helper_method function. While the linked issue tracks the problem in core, I'm going to create a separate issue report here, so that this can hopefully be addressed sometime soon.

spaghetticode commented 5 years ago

As of today the issue reported by the OP is not present anymore. I think this issue can be closed.