Open adityapingle opened 8 years ago
Change the line in your Gemfile to:
gem 'middleman-deploy', github: 'middleman-contrib/middleman-deploy', branch: 'master'
You need to use the latest version, because of changes in the middleman v4.0.0 API. Your other option is to downgrade middleman-core to v3
I think I'm seeing a related issue – I've added the latest version to my gemfile as above, but when running bundle exec middleman deploy
I get an error message stating Setting method doesn't exist (Runtime Error)
. I'm using Ruby 2.2.2 and Middleman v4, and using a standard github-pages deploy setup which has worked on v3 sites.
I can confirm this issue. Ruby 2.2.1, middleman-core-4.1.1 here.
I also encountered this issue until I saw @kirichkov 's instructions. Please consider updating the README.
Encountered same problem and @kirichkov's comment solved it for me. Had to specify git instead of github.
gem 'middleman-deploy', git: 'https://github.com/middleman-contrib/middleman-deploy', branch: 'master'
I can confirm this too. However, solutions above doesn't help. The trace is:
$ bundle exec middleman deploy -b
/Users/legal/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/bundler/gems/middleman-deploy-243ab38b0889/lib/middleman-deploy/commands.rb:94:in `deploy_options': undefined method `deploy_method' for nil:NilClass (NoMethodError)
from /Users/legal/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/bundler/gems/middleman-deploy-243ab38b0889/lib/middleman-deploy/commands.rb:64:in `build_before'
from /Users/legal/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/bundler/gems/middleman-deploy-243ab38b0889/lib/middleman-deploy/commands.rb:57:in `deploy'
from /Users/legal/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /Users/legal/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /Users/legal/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `block in invoke_all'
from /Users/legal/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `each'
from /Users/legal/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `map'
from /Users/legal/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `invoke_all'
from /Users/legal/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/group.rb:232:in `dispatch'
from /Users/legal/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:115:in `invoke'
from /Users/legal/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor.rb:40:in `block in register'
from /Users/legal/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /Users/legal/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /Users/legal/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
from /Users/legal/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /Users/legal/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/middleman-cli-4.1.6/bin/middleman:67:in `<top (required)>'
from /Users/legal/.rbenv/versions/2.1.0/bin/middleman:23:in `load'
from /Users/legal/.rbenv/versions/2.1.0/bin/middleman:23:in `<main>'
It would seem that simply changing your deploy.method
to deploy.deploy_method
will fix this problem.
I believe that commit 9eece01aef5228f938045d317066caf9603f6a0a is responsible for the change. Not entirely sure why the change though? Seems like it may have been a typo.
activate :deploy do |deploy|
deploy.deploy_method = :rsync
end
hello,
while trying to include the deploy block as suggested in this repo, i get the following error when i try to execute middleman server or middleman build.
/home/aditya/development/slate/slate/config.rb:35:in
block in initialize': undefined method
deploy_method=' for #Middleman::Deploy::Options:0x007fbfaf4beee0 (NoMethodError)ruby versions tried: 1.9.3 (had to upgrade as net-ssh requires >=2.0.0) 2.0.0 2.3.0
executing middleman: middleman server (while on 1.9.3) bundle exec middleman s
what additional information I might need to provide?