Skip to content

No such file to load -- kramdown (LoadError) #499

Closed
piouPiouM opened this Issue Jun 23, 2012 · 5 comments

3 participants

@piouPiouM

Hi,

I could not use the markdown parser Kramdown with Middleman ~>2.0. Indeed, I get a nice stack trace (see below).

Thx for your help.

config.rb

require "kramdown"
set :markdown_engine, :kramdown
set :markdown, :layout_engine => :haml
set :kramdown, :parse_block_html => true

Stack trace

/Users/mehdi/.rvm/gems/ruby-1.9.2-p180@middleman/gems/middleman-2.0.16/lib/middleman/core_extensions/features.rb:82:in `class_eval': no such file to load -- kramdown (LoadError)
    from (eval):13:in `new'
    from /Users/mehdi/.rvm/gems/ruby-1.9.2-p180@middleman/gems/middleman-2.0.16/lib/middleman/core_extensions/features.rb:82:in `class_eval'
    from /Users/mehdi/.rvm/gems/ruby-1.9.2-p180@middleman/gems/middleman-2.0.16/lib/middleman/core_extensions/features.rb:82:in `new'
    from /Users/mehdi/.rvm/gems/ruby-1.9.2-p180@middleman/gems/middleman-2.0.16/lib/middleman.rb:193:in `start_server'
    from /Users/mehdi/.rvm/gems/ruby-1.9.2-p180@middleman/gems/middleman-2.0.16/lib/middleman/guard.rb:62:in `block in server_start'
    from /Users/mehdi/.rvm/gems/ruby-1.9.2-p180@middleman/gems/middleman-2.0.16/lib/middleman/guard.rb:61:in `fork'
    from /Users/mehdi/.rvm/gems/ruby-1.9.2-p180@middleman/gems/middleman-2.0.16/lib/middleman/guard.rb:61:in `server_start'
    from /Users/mehdi/.rvm/gems/ruby-1.9.2-p180@middleman/gems/middleman-2.0.16/lib/middleman/guard.rb:56:in `run_on_changes'
    from /Users/mehdi/.rvm/gems/ruby-1.9.2-p180@middleman/gems/guard-1.1.1/lib/guard/runner.rb:91:in `block (2 levels) in run_supervised_task'
    from /Users/mehdi/.rvm/gems/ruby-1.9.2-p180@middleman/gems/guard-1.1.1/lib/guard/runner.rb:89:in `catch'
    from /Users/mehdi/.rvm/gems/ruby-1.9.2-p180@middleman/gems/guard-1.1.1/lib/guard/runner.rb:89:in `block in run_supervised_task'
    from /Users/mehdi/.rvm/gems/ruby-1.9.2-p180@middleman/gems/guard-1.1.1/lib/guard.rb:311:in `block in within_preserved_state'
    from <internal:prelude>:10:in `synchronize'
    from /Users/mehdi/.rvm/gems/ruby-1.9.2-p180@middleman/gems/guard-1.1.1/lib/guard.rb:308:in `within_preserved_state'
    from /Users/mehdi/.rvm/gems/ruby-1.9.2-p180@middleman/gems/guard-1.1.1/lib/guard/runner.rb:87:in `run_supervised_task'
    from /Users/mehdi/.rvm/gems/ruby-1.9.2-p180@middleman/gems/guard-1.1.1/lib/guard/runner.rb:140:in `block in run_first_task_found'
    from /Users/mehdi/.rvm/gems/ruby-1.9.2-p180@middleman/gems/guard-1.1.1/lib/guard/runner.rb:138:in `each'
    from /Users/mehdi/.rvm/gems/ruby-1.9.2-p180@middleman/gems/guard-1.1.1/lib/guard/runner.rb:138:in `run_first_task_found'
    from /Users/mehdi/.rvm/gems/ruby-1.9.2-p180@middleman/gems/guard-1.1.1/lib/guard/runner.rb:70:in `block in run_on_changes'
    from /Users/mehdi/.rvm/gems/ruby-1.9.2-p180@middleman/gems/guard-1.1.1/lib/guard/runner.rb:164:in `block (3 levels) in scoped_guards'
    from /Users/mehdi/.rvm/gems/ruby-1.9.2-p180@middleman/gems/guard-1.1.1/lib/guard/runner.rb:163:in `each'
    from /Users/mehdi/.rvm/gems/ruby-1.9.2-p180@middleman/gems/guard-1.1.1/lib/guard/runner.rb:163:in `block (2 levels) in scoped_guards'
    from /Users/mehdi/.rvm/gems/ruby-1.9.2-p180@middleman/gems/guard-1.1.1/lib/guard/runner.rb:162:in `catch'
    from /Users/mehdi/.rvm/gems/ruby-1.9.2-p180@middleman/gems/guard-1.1.1/lib/guard/runner.rb:162:in `block in scoped_guards'
    from /Users/mehdi/.rvm/gems/ruby-1.9.2-p180@middleman/gems/guard-1.1.1/lib/guard/runner.rb:161:in `each'
    from /Users/mehdi/.rvm/gems/ruby-1.9.2-p180@middleman/gems/guard-1.1.1/lib/guard/runner.rb:161:in `scoped_guards'
    from /Users/mehdi/.rvm/gems/ruby-1.9.2-p180@middleman/gems/guard-1.1.1/lib/guard/runner.rb:63:in `run_on_changes'
    from /Users/mehdi/.rvm/gems/ruby-1.9.2-p180@middleman/gems/guard-1.1.1/lib/guard.rb:107:in `block in setup_listener'
    from /Users/mehdi/.rvm/gems/ruby-1.9.2-p180@middleman/gems/listen-0.4.6/lib/listen/listener.rb:190:in `call'
    from /Users/mehdi/.rvm/gems/ruby-1.9.2-p180@middleman/gems/listen-0.4.6/lib/listen/listener.rb:190:in `on_change'
    from /Users/mehdi/.rvm/gems/ruby-1.9.2-p180@middleman/gems/listen-0.4.6/lib/listen/listener.rb:199:in `block in initialize_adapter'
    from /Users/mehdi/.rvm/gems/ruby-1.9.2-p180@middleman/gems/listen-0.4.6/lib/listen/adapters/polling.rb:55:in `call'
    from /Users/mehdi/.rvm/gems/ruby-1.9.2-p180@middleman/gems/listen-0.4.6/lib/listen/adapters/polling.rb:55:in `poll'
    from /Users/mehdi/.rvm/gems/ruby-1.9.2-p180@middleman/gems/listen-0.4.6/lib/listen/adapters/polling.rb:31:in `block in start'

Gemfile

source "http://rubygems.org"

gem "sass", "~>3.2.0.alpha"
gem "compass", "~> 0.12.2.rc"
gem "oily_png"
gem "susy", "~> 1.0.rc"
gem "compass-recipes", "~> 0.3.0.alpha"
gem "middleman", "~>2.0"
gem "middleman-smusher", "~> 0.2.0"
gem "kramdown", "~> 0.13.7"
gem "rack-codehighlighter", :git => "git://github.com/wbzyl/rack-codehighlighter.git"
gem "pygments.rb"
@tdreyno
Middleman member
tdreyno commented Jun 23, 2012

Did you run MM through bundler? bundle exec middleman

@piouPiouM

@tdreyno I run MM with middleman only. It works with bundle exec middleman.

Thx!

@piouPiouM piouPiouM closed this Jun 23, 2012
@tdreyno
Middleman member
tdreyno commented Jun 24, 2012

We're in an awkward place right now. Basically, Bundler is the only way to get Ruby projects with lots of dependencies to work sanely, but Rubygems doesn't use it automatically. We're building Bundler into 3.0, so that's the way forward, but we're stuck with bundle exec for the time being :(

@bhollis
Middleman member
bhollis commented Jun 24, 2012

Perhaps we need to detect whether Bundler is available in the middleman executable and re-exec under bundle exec if not. How does rails do this?

@tdreyno
Middleman member
tdreyno commented Jun 24, 2012

Pretty sure we're already doing that in 3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.