middleman / middleman-blog

Blog Engine Extension for Middleman
https://middlemanapp.com
MIT License
326 stars 179 forks source link

Middleman issue `require': cannot load such file -- builder (LoadError) #326

Closed doronkatz closed 7 years ago

doronkatz commented 7 years ago

Im getting the following error, on my Mac OS X Sierra, for middleman (4.1.14):

doronkatz@Dorons-Macbook ~/Documents/Journalism/GitLab_Posts/source/posts (How-to-use-GitLab-with-Jira)$ middleman /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/tilt-2.0.5/lib/tilt/builder.rb:2:inrequire': cannot load such file -- builder (LoadError) from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/tilt-2.0.5/lib/tilt/builder.rb:2:in <top (required)>' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/tilt-2.0.5/lib/tilt/mapping.rb:243:inrequire' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/tilt-2.0.5/lib/tilt/mapping.rb:243:in block in lazy_load' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/tilt-2.0.5/lib/tilt/mapping.rb:241:ineach' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/tilt-2.0.5/lib/tilt/mapping.rb:241:in lazy_load' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/tilt-2.0.5/lib/tilt/mapping.rb:216:inlookup' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/tilt-2.0.5/lib/tilt/mapping.rb:154:in []' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/tilt-2.0.5/lib/tilt.rb:48:in[]' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/middleman-core-4.1.14/lib/middleman-core/sources/source_watcher.rb:336:in strip_extensions' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/contracts-0.13.0/lib/contracts/method_reference.rb:43:insend_to' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/contracts-0.13.0/lib/contracts/call_with.rb:76:in call_with' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/contracts-0.13.0/lib/contracts/method_handler.rb:138:inblock in redefine_method' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/middleman-core-4.1.14/lib/middleman-core/sources/source_watcher.rb:324:in record_file_change' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/contracts-0.13.0/lib/contracts/method_reference.rb:43:insend_to' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/contracts-0.13.0/lib/contracts/call_with.rb:76:in call_with' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/contracts-0.13.0/lib/contracts/method_handler.rb:138:inblock in redefine_method' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/middleman-core-4.1.14/lib/middleman-core/sources/source_watcher.rb:265:in block in update' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/middleman-core-4.1.14/lib/middleman-core/sources/source_watcher.rb:264:ineach' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/middleman-core-4.1.14/lib/middleman-core/sources/source_watcher.rb:264:in update' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/contracts-0.13.0/lib/contracts/method_reference.rb:43:insend_to' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/contracts-0.13.0/lib/contracts/call_with.rb:76:in call_with' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/contracts-0.13.0/lib/contracts/method_handler.rb:138:inblock in redefine_method' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/middleman-core-4.1.14/lib/middleman-core/sources/source_watcher.rb:212:in poll_once!' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/contracts-0.13.0/lib/contracts/method_reference.rb:43:insend_to' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/contracts-0.13.0/lib/contracts/call_with.rb:76:in call_with' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/contracts-0.13.0/lib/contracts/method_handler.rb:138:inblock in redefine_method' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/middleman-core-4.1.14/lib/middleman-core/sources.rb:241:in block in poll_once!' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/middleman-core-4.1.14/lib/middleman-core/sources.rb:241:ineach' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/middleman-core-4.1.14/lib/middleman-core/sources.rb:241:in reduce' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/middleman-core-4.1.14/lib/middleman-core/sources.rb:241:inpoll_once!' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/contracts-0.13.0/lib/contracts/method_reference.rb:43:in send_to' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/contracts-0.13.0/lib/contracts/call_with.rb:76:incall_with' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/contracts-0.13.0/lib/contracts/method_handler.rb:138:in block in redefine_method' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/middleman-core-4.1.14/lib/middleman-core/core_extensions/file_watcher.rb:47:inbefore_configuration' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/contracts-0.13.0/lib/contracts/method_reference.rb:43:in send_to' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/contracts-0.13.0/lib/contracts/call_with.rb:76:incall_with' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/contracts-0.13.0/lib/contracts/method_handler.rb:138:in block in redefine_method' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/middleman-core-4.1.14/lib/middleman-core/callback_manager.rb:57:ininstance_exec' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/middleman-core-4.1.14/lib/middleman-core/callback_manager.rb:57:in block in execute' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/hamster-3.0.0/lib/hamster/vector.rb:1316:ineach' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/hamster-3.0.0/lib/hamster/vector.rb:1316:in traverse_depth_first' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/hamster-3.0.0/lib/hamster/vector.rb:431:ineach' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/middleman-core-4.1.14/lib/middleman-core/callback_manager.rb:57:in execute' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/contracts-0.13.0/lib/contracts/method_reference.rb:43:insend_to' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/contracts-0.13.0/lib/contracts/call_with.rb:76:in call_with' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/contracts-0.13.0/lib/contracts/method_handler.rb:138:inblock in redefine_method' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/middleman-core-4.1.14/lib/middleman-core/callback_manager.rb:28:in block in install_methods!' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/middleman-core-4.1.14/lib/middleman-core/application.rb:283:ininitialize' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/middleman-cli-4.1.14/bin/middleman:49:in new' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/gems/middleman-cli-4.1.14/bin/middleman:49:in<top (required)>' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/bin/middleman:22:in load' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/bin/middleman:22:in

' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/bin/ruby_executable_hooks:15:in eval' from /Users/doronkatz/.rvm/gems/ruby-2.2.5/bin/ruby_executable_hooks:15:in
' `

murraysum commented 7 years ago

@doronkatz If you haven't realised then you are missing the builder dependency from your Gemfile. This is used to parse the feed.xml.builder file. If you add the following line to your Gemfile then it will resolve your issues:

gem "builder", "~> 3.0"

The missing dependency happens when you are adding middleman-blog to an existing middleman site using middleman init --template=blog. It then asks you whether you want to overwrite some existing files such as your Gemfile and if you happen to say no then you'll be missing the dependency:

       exist
    conflict  .gitignore
Overwrite /Users/murray/Development/personal/website/.gitignore? (enter "h" for help) [Ynaqdh] n
        skip  .gitignore
    conflict  Gemfile
Overwrite /Users/murray/Development/personal/website/Gemfile? (enter "h" for help) [Ynaqdh] n
        skip  Gemfile
    conflict  config.rb
Overwrite /Users/murray/Development/personal/website/config.rb? (enter "h" for help) [Ynaqdh] n
        skip  config.rb
      create  source/2012-01-01-example-article.html.markdown
      create  source/calendar.html.erb
      create  source/feed.xml.builder
    conflict  source/index.html.erb
Overwrite /Users/murray/Development/personal/website/source/index.html.erb? (enter "h" for help) [Ynaqdh] n
        skip  source/index.html.erb
      create  source/layout.erb
      create  source/tag.html.erb
         run  bundle install from "."

@tdreyno @bhollis I'm surprised that builder isn't one of the explicit dependencies declared in the gemspec. Is this just an oversight or is there an explicit reason? Would you folks accept a PR to explicit require the dependency in the gemspec and accept another PR to update the blog template repository to remove builder from the Gemfile. Thanks, let me know if you need anymore information.

bhollis commented 7 years ago

There's nothing in middleman-blog itself that requires builder. It's only needed if you want to make your own builder templates... in which case you should depend on it.

-Ben

On Feb 16, 2017, at 1:09 AM, Murray Summers notifications@github.com wrote:

@doronkatz If you haven't realised then you are missing the builder dependency from your Gemfile. This is used to parse the feed.xml.builder file. If you add the following line to your Gemfile then it will resolve your issues:

gem "builder", "~> 3.0" The missing dependency happens when you are adding middleman-blog to an existing middleman site using middleman init --template=blog. It then asks you whether you want to overwrite some existing files such as your Gemfile and if you happen to say no then you'll be missing the dependency:

   exist
conflict  .gitignore

Overwrite /Users/murray/Development/personal/website/.gitignore? (enter "h" for help) [Ynaqdh] n skip .gitignore conflict Gemfile Overwrite /Users/murray/Development/personal/website/Gemfile? (enter "h" for help) [Ynaqdh] n skip Gemfile conflict config.rb Overwrite /Users/murray/Development/personal/website/config.rb? (enter "h" for help) [Ynaqdh] n skip config.rb create source/2012-01-01-example-article.html.markdown create source/calendar.html.erb create source/feed.xml.builder conflict source/index.html.erb Overwrite /Users/murray/Development/personal/website/source/index.html.erb? (enter "h" for help) [Ynaqdh] n skip source/index.html.erb create source/layout.erb create source/tag.html.erb run bundle install from "." @tdreyno @bhollis I'm surprised that builder isn't one of the explicit dependencies declared in the gemspec. Is this just an oversight or is there an explicit reason? Would you folks accept a PR to explicit require the dependency in the gemspec and accept another PR to update the blog template repository to remove builder from the Gemfile. Thanks, let me know if you need anymore information.

― You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

murraysum commented 7 years ago

Thanks for the reply @bhollis . Sounds like you consider the feed.xml.builder file to be out with the remit of middleman-blog which makes sense. Sounds like the issue can be closed off then.

iwarner commented 7 years ago

Closing