Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Slim is giving undefined error with middleman

Have tried searching for some blogs on resolving this issue, unable to do so.

Getting the following error when I try starting middleman server.

/var/lib/gems/1.9.1/gems/middleman-core-3.3.10/lib/middleman-core/renderers/slim.rb:31:in
`registered': undefined method `set_options' for 
Slim::Engine:Class (NoMethodError)`

Here's my Gemfile ->

gem "middleman", "~>3.3.10"
gem "slim", ">= 2.0"

# Live-reloading plugin
gem "middleman-livereload", "~> 3.1.0"

# 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]
gem 'middleman-php', :git => 'https://github.com/appjudo/middleman-php.git', :branch => 'master'
gem 'skim'

This - is the gemlock file.

like image 411
Vivek Chandra Avatar asked Nov 10 '22 18:11

Vivek Chandra


1 Answers

I had the same issue after updating an old version of middleman to 3.4

I figured my Slim was old so I found the latest version by executing this at the command prompt:

gem list slim --remote

Then I updated my gemfile to include the newer version of slim like this:

gem "slim", "~> 3.0"

Then I did bundle install and middleman and the error was fixed.

like image 199
David Silva Smith Avatar answered Jan 04 '23 01:01

David Silva Smith