middleman-php icon indicating copy to clipboard operation
middleman-php copied to clipboard

cannot run middleman-php Middleman 4.1.8.

Open Liney opened this issue 9 years ago • 3 comments

Follow install instructions and now middleman crashes when I try and run.

C:\Users\Websites\My Site>middleman WARN: Unresolved specs during Gem::Specification.reset: rack (< 2.0, >= 1.4.5) activesupport (>= 3.1, ~> 4.2) listen (~> 3.0.0) sass (>= 3.4) execjs (< 3, >= 0.3.0, ~> 2.0) concurrent-ruby (~> 1.0) WARN: Clearing out unresolved specs. Please report a bug if this causes problems. C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.12.4/lib/bundler/ runtime.rb:89:in rescue in block (2 levels) in require': There was an error whi le trying to load the gem 'middleman-php'. (Bundler::GemRequireError) Gem Load Error is: undefined methodregister' for Middleman::PhpExtension:Class

Backtrace for gem load error is: C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/middleman-php-0.0.3/lib/mid dleman-php.rb:4:in <top (required)>' C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.12.4/lib/bundler/ runtime.rb:86:inrequire' C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.12.4/lib/bundler/ runtime.rb:86:in block (2 levels) in require' C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.12.4/lib/bundler/ runtime.rb:81:ineach' C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.12.4/lib/bundler/ runtime.rb:81:in block in require' C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.12.4/lib/bundler/ runtime.rb:70:ineach' C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.12.4/lib/bundler/ runtime.rb:70:in require' C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.12.4/lib/bundler. rb:102:inrequire' C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/middleman-core-4.1.8/lib/mi ddleman-core/load_paths.rb:35:in setup_bundler' C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/middleman-core-4.1.8/lib/mi ddleman-core/load_paths.rb:15:insetup_load_paths' C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/middleman-cli-4.1.8/bin/mid dleman:10:in <top (required)>' C:/RailsInstaller/Ruby2.1.0/bin/middleman:23:inload' C:/RailsInstaller/Ruby2.1.0/bin/middleman:23:in <main>' Bundler Error Backtrace: from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.12.4 /lib/bundler/runtime.rb:85:inblock (2 levels) in require' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.12.4 /lib/bundler/runtime.rb:81:in each' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.12.4 /lib/bundler/runtime.rb:81:inblock in require' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.12.4 /lib/bundler/runtime.rb:70:in each' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.12.4 /lib/bundler/runtime.rb:70:inrequire' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.12.4 /lib/bundler.rb:102:in require' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/middleman-core -4.1.8/lib/middleman-core/load_paths.rb:35:insetup_bundler' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/middleman-core -4.1.8/lib/middleman-core/load_paths.rb:15:in setup_load_paths' from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/middleman-cli- 4.1.8/bin/middleman:10:in<top (required)>' from C:/RailsInstaller/Ruby2.1.0/bin/middleman:23:in load' from C:/RailsInstaller/Ruby2.1.0/bin/middleman:23:in

'

Liney avatar May 27 '16 19:05 Liney

I try to get it running with Middleman 4.1.10.

The fork from @dannyvassallo solves this particular problem but others appear.

In his fork I changed ::Middleman::Php::Extension to ::Middleman::PhpExtension in the middleman-php.rb file.

/lib/middleman-php/extension.rb:25:in `options_for_middleware': undefined method `settings' for #<Middleman::Application:0x70208914940680> (NoMethodError)

Does anyone has more knowledge of the changes of Middleman 4, so we can get this gem running again?

michaelbaisch avatar Aug 17 '16 18:08 michaelbaisch

@michaelbaisch I forked it with the intention of refactoring the gem for middleman 4. I didn't finish at all. The gem will run but it won't work -- It needs some refactoring on my part. I'll try to get around to it ASAP and submit a PR or potentially maintain a 4.x version but I can't make any promises 😉 .

dannyvassallo avatar Aug 17 '16 18:08 dannyvassallo

alguien ha podido conseguir una solución al problema de compilado de php en middleman

biglemus avatar Feb 18 '20 20:02 biglemus