Error trying to load gem middleman-bootstrap-navbar
josephgodwinkimani opened this issue · comments
I am using middleman static website generation gem to develop a website. I want to include the bootstrap navbar into index file so i installed middleman-bootstrap-navbar gem.
Here is my config.rb
configure :development do
activate :livereload
activate :bootstrap_navbar
ready do
sprockets.import_asset 'bootstrap.js'
end
configure :build do
end
Here is my gemfile
# Middleman Gems
gem 'middleman', '>= 4.0.0'
# Live-reloading plugin
gem 'middleman-livereload'
gem 'middleman-compass', '>= 4.0.0'
# Navigation
gem 'middleman-bootstrap-navbar'
gem "sass"
gem "bootstrap-sass", "~> 3.3.6", :require => false
gem 'sass-rails', '>=3.2'
gem "jquery-middleman" #Don't forget to run 'bundle install'
gem 'sprockets-rails', '~>3.0.0'
Here is my all.js
//= require jquery
//= require bootstrap-sprockets
//= require tree .
Here is my site.css.sass
@import "bootstrap-sprockets";
@import "normalize";
@import "bootstrap";
@charset "utf-8";
I Run bundle install after installing all necessary gems and restarted my server at LiveReload ip bundle exec middleman
. I got this error afterwards:
screenshot of the error in mysysgit
please help.
PS: Sorry I couldnt paste the error code here. That feature is not enabled in mysysgit bash.
Well, I'm guessing that this has something to do with trying to run this on Windows... 😺
If you remove middleman-bootstrap-navbar
from your Gemfile and activate :bootstrap_navbar
from your config.rb, does everything else work then?
The error message from Bundler is pretty useless of course since it swallows the actual error message. Seems like this was only fixed recently so until Bundler > 1.11.2 is released, I can only guess what causes this error...
When I remove middleman-bootstrap-navbar
from my Gemfile and activate :bootstrap_navbar
from my config.rb, everything else works fine! I am using bundler 1.11.2...ty
Having the same issue here. Removing middleman-bootstrap-navbar
from my Gemfile doesn't fix it; I then get this error:
/.../repo/vendor/ruby/2.1.0/gems/middleman-core-4.0.0/lib/middleman-core/extensions.rb:86:in
load': Unknown Extension: bootstrap_navbar. Check the name and make sure you have referenced the extension's gem in your Gemfile. (RuntimeError) from /.../repo/vendor/ruby/2.1.0/gems/middleman-core-4.0.0/lib/middleman-core/extension_manager.rb:49:in
activate'
@sman591 Are you on Windows as well?
Could you upload a small sample app so I can reproduce the error?
@manuelmeurer No, OS X. I can upload a sample app tomorrow
@sman591 @Gochojr What version of middleman-bootstrap-navbar are you using? Can you try to open a IRB or Pry session and simply require the gem there to see if that works?
@manuelmeurer The very same here, brand new instance of Middleman.
/home/hrb33/.rvm/gems/ruby-2.2.1/gems/middleman-core-4.1.2/lib/middleman-core/extensions.rb:86:in `load': Unknown Extension: bootstrap_navbar. Check the name and make sure you have referenced the extension's gem in your Gemfile. (RuntimeError)
config.rb:
activate :bootstrap_navbar
Gemfile
# If you do not have OpenSSL installed, change
# the following line to use 'http://'
source 'https://rubygems.org'
# For faster file watcher updates on Windows:
gem 'wdm', '~> 0.1.0', platforms: [:mswin, :mingw]
# Windows does not come with time zone data
gem 'tzinfo-data', platforms: [:mswin, :mingw, :jruby]
# Middleman Gems
gem 'middleman', '>= 4.0.0'
gem 'middleman-livereload'
gem 'therubyracer'
gem 'bootstrap-sass'
gem 'middleman-bootstrap-navbar'
gem 'jquery-middleman'
Sorry for the late response. Please try v3 which I just pushed, it should work with Middleman v3 and v4 now.