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

Error with Middleman 4.2 and middleman-deploy 1.0

Open hugobarthelemy opened this issue 7 years ago • 16 comments

impossible to launch middleman server. I'have this error when I launch the middleman server :

WARN: Unresolved specs during Gem::Specification.reset: rack (< 3, >= 1.4.5) tilt (< 3, >= 1.4.1, ~> 2.0) parallel (>= 0) activesupport (< 5.1, >= 3.1, >= 4.2) addressable (~> 2.3) sass (>= 3.4) uglifier (~> 3.0) hashie (~> 3.4) concurrent-ruby (~> 1.0) WARN: Clearing out unresolved specs. Please report a bug if this causes problems. /usr/local/opt/rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/middleman-core-4.2.1/lib/middleman-core/extensions.rb:96:in load': Tried to activate old-style extension: deploy. They are no longer supported. (RuntimeError) from /usr/local/opt/rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/middleman-core-4.2.1/lib/middleman-core/extensions.rb:127:in block in load_settings' from /usr/local/opt/rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/middleman-core-4.2.1/lib/middleman-core/extensions.rb:125:in each' from /usr/local/opt/rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/middleman-core-4.2.1/lib/middleman-core/extensions.rb:125:in load_settings' from /usr/local/opt/rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/middleman-core-4.2.1/lib/middleman-core/extension_manager.rb:12:in initialize' from /usr/local/opt/rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/middleman-core-4.2.1/lib/middleman-core/application.rb:263:in new' from /usr/local/opt/rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/middleman-core-4.2.1/lib/middleman-core/application.rb:263:in initialize' from /usr/local/opt/rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/middleman-cli-4.2.1/bin/middleman:49:in new' from /usr/local/opt/rbenv/versions/2.3.2/lib/ruby/gems/2.3.0/gems/middleman-cli-4.2.1/bin/middleman:49:in <top (required)>' from /usr/local/opt/rbenv/versions/2.3.2/bin/middleman:22:in load' from /usr/local/opt/rbenv/versions/2.3.2/bin/middleman:22:in `

'

Steps to reproduce the problem (from a clean middleman installation)

$ gem install middleman $ middleman init add ''' gem 'middleman-deploy', '~> 1.0' ''' in gemfile $ bundle install add in config.rb :

activate :deploy do |deploy|
  deploy.deploy_method = :git
  # Optional Settings
  # deploy.remote   = 'custom-remote' # remote name or git url, default: origin
  # deploy.branch   = 'custom-branch' # default: gh-pages
  # deploy.strategy = :submodule      # commit strategy: can be :force_push or :submodule, default: :force_push
  # deploy.commit_message = 'custom-message'      # commit message (can be empty), default: Automated commit at `timestamp` by middleman-deploy `version`
end""

$ middleman server --> error

Additional information

  • Ruby version: ruby 2.3.2p217 (2016-11-15 revision 56796) [x86_64-darwin16]
  • Middleman version: 4.2
  • OS version: iOS 10.12.4

my code is : https://github.com/hugobarthelemy/combidav

hugobarthelemy avatar May 20 '17 23:05 hugobarthelemy

Same issue.

ParthKolekar avatar Jun 08 '17 17:06 ParthKolekar

Same here.

ghost avatar Jul 03 '17 09:07 ghost

This project seems to be dead. There hasn't been a commit pushed for 2 years. I suggest forking or moving away from it.

jahed avatar Jul 07 '17 10:07 jahed

Yeah, I've noticed. What a shame.

antonijap avatar Jul 07 '17 10:07 antonijap

Same issue, any news ?

MaximeMenotti avatar Aug 11 '17 21:08 MaximeMenotti

Nope. I've ditched Middleman for https://getgrav.org/

antonijap avatar Aug 14 '17 07:08 antonijap

same problem in my case

josefzacek avatar Oct 05 '17 19:10 josefzacek

I managed to deploy using https://github.com/gsamokovarov/middleman-gh_pages

ruby -v ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]

middleman v Middleman 4.2.1

GitHub repo: https://github.com/josefzacek/jawaireland.ie

Live site: http://www.jawaireland.ie/

josefzacek avatar Oct 06 '17 17:10 josefzacek

works for me, but I had to ensure the following:

gem 'middleman-deploy', '~> 2.0.0.pre.alpha'

and

activate :deploy do |deploy|
  deploy.deploy_method = :git

as mentioned in other threads ...

tansaku avatar Oct 18 '17 09:10 tansaku

someone merged a PR two days ago - maybe the project is coming back to life?

tansaku avatar Oct 18 '17 09:10 tansaku

@joneslee85 how's everything going? do you need help with this project?

tansaku avatar Oct 18 '17 09:10 tansaku

I am still getting this error on master too, and had to switch to alpha branch and now I am seeing NoMethodError: undefined method deploy_method' for nil:NilClass`

chrishough avatar Feb 25 '18 17:02 chrishough

@chrishough Are you using configure in the first line of your deploy config? I had the same issue and then switched from configure to activate and it solved the problem for me (when using the alpha branch)

agbodike avatar Mar 15 '18 23:03 agbodike

I am using gem 'middleman-deploy', git: 'https://github.com/middleman-contrib/middleman-deploy', branch: 'master' with this:

activate :deploy do |deploy|
  deploy.build_before   = true
  deploy.deploy_method  = :git
  deploy.branch         = 'TEST-BRANCH'
end``` and it is working

chrishough avatar Mar 23 '18 17:03 chrishough

Interesting, I thought the master branch is broken. I am using the alpha branch, which seems to work:

gem 'middleman-deploy',       '~> 2.0.0.pre.alpha'

My config looks like:

activate :deploy do |deploy|
  deploy.deploy_method = :rsync
  deploy.host          = 'user@hostname'
  deploy.path          = '/path/to/files'
  deploy.build_before  = true
end

Glad to hear yours is working!

agbodike avatar Mar 23 '18 19:03 agbodike

# Gemfile
gem "middleman-deploy", "~> 2.0.0.pre.alpha"

# config.rb
activate :deploy do |deploy|
  deploy.deploy_method = :git
  deploy.branch = 'gh-pages'
end

fguillen avatar Dec 22 '18 17:12 fguillen