Usage when the assets pipeline is disabled
Closed this issue · 2 comments
jukkakoskinen commented
Is it possible to use this gem without the assets? I'm using the Turbolinks npm package, but would like to use the redirection stuff from this gem.
I have a --skip-sprockets
project which outputs this on rails s
:
rescue in block (2 levels) in require': There was an error while trying to load the gem 'turbolinks'. (Bundler::GemRequireError)
Gem Load Error is: undefined method `assets' for #<Rails::Engine::Configuration:0x007fcf51d04350>
jukkakoskinen commented
I solved it, but I'm not sure if this is the best way. Any input?
Gemfile
gem "turbolinks", "~> 5.0.0", require: false
application_controller.rb
require "turbolinks/redirection"
class ApplicationController < ActionController::Base
include Turbolinks::Redirection
...
guilleiguaran commented
Getting same error and I think this is a better solution: #18