middleman / middleman-sprockets

Sprockets support for Middleman
http://middlemanapp.com
MIT License
62 stars 53 forks source link

Middleman Sprockets Already Activated #108

Closed fny closed 8 years ago

fny commented 8 years ago

Whenever I add activate :sprockets to my config.rb file, I get the following error:

middleman-core/extension_manager.rb:64:in `activate': sprockets has already been activated and cannot be re-activated.

It looks like middleman-sprockets is somehow activating itself.

Running Middleman 4.1.6 with Middleman Sprockets 4.0.0.rc.1. Here's my config file with comments removed:

page '/*.xml', layout: false
page '/*.json', layout: false
page '/*.txt', layout: false

configure :development do
  activate :livereload
  activate :sprockets
end

configure :build do
end
stevenosloan commented 8 years ago

Yeah, if you're running the version off of rubygems you'll get that. The activation is a change made between rc1 and now. Should be good pulling off of master:

# Gemfile
gem "middleman-sprockets", github: "middleman/middleman-sprockets"

Also, I think you'll want to activate sprockets outside the development block -- otherwise it wouldn't run on build and assets would be handled differently (unless that's on purpose).

Let me know if you run into anything else.