Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error trying to load gem middleman-bootstrap-navbar #3

Closed
josephgodwinkimani opened this issue Jan 9, 2016 · 8 comments
Closed

Error trying to load gem middleman-bootstrap-navbar #3

josephgodwinkimani opened this issue Jan 9, 2016 · 8 comments

Comments

@josephgodwinkimani
Copy link

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.

@manuelmeurer
Copy link
Member

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...

@josephgodwinkimani
Copy link
Author

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

@sman591
Copy link

sman591 commented Jan 20, 2016

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:inactivate'

@manuelmeurer
Copy link
Member

@sman591 Are you on Windows as well?
Could you upload a small sample app so I can reproduce the error?

@sman591
Copy link

sman591 commented Jan 21, 2016

@manuelmeurer No, OS X. I can upload a sample app tomorrow

@manuelmeurer
Copy link
Member

@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?

@davidhrbac
Copy link

@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'

@manuelmeurer
Copy link
Member

Sorry for the late response. Please try v3 which I just pushed, it should work with Middleman v3 and v4 now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants