Errors running capistrano in bedrock

Hi,

I am learning to deploy my first bedrock stack using capistrano and have watched the screencast. Everything seems fairly straight forward and I have followed the steps to install capistrano gem and bundle with gem file in my project root etc.

When running bundle exec cap install (or just cap) I get the following errors:

c:/Ruby22/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/authentication/page
ant.rb:1:in `require': cannot load such file -- dl/import (LoadError)
        from c:/Ruby22/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/authen
tication/pageant.rb:1:in `<top (required)>'
        from c:/Ruby22/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/authen
tication/agent/socket.rb:5:in `require'
        from c:/Ruby22/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/authen
tication/agent/socket.rb:5:in `<top (required)>'
        from c:/Ruby22/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/authen
tication/agent.rb:22:in `require'
        from c:/Ruby22/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/authen
tication/agent.rb:22:in `<top (required)>'
        from c:/Ruby22/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/authen
tication/key_manager.rb:4:in `require'
        from c:/Ruby22/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/authen
tication/key_manager.rb:4:in `<top (required)>'
        from c:/Ruby22/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/authen
tication/session.rb:4:in `require'
        from c:/Ruby22/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/authen
tication/session.rb:4:in `<top (required)>'
        from c:/Ruby22/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh.rb:11:
in `require'
        from c:/Ruby22/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh.rb:11:
in `<top (required)>'
        from c:/Ruby22/lib/ruby/gems/2.2.0/gems/sshkit-1.7.1/lib/sshkit/backends
/netssh.rb:1:in `require'
        from c:/Ruby22/lib/ruby/gems/2.2.0/gems/sshkit-1.7.1/lib/sshkit/backends
/netssh.rb:1:in `<top (required)>'
        from c:/Ruby22/lib/ruby/gems/2.2.0/gems/sshkit-1.7.1/lib/sshkit/all.rb:3
2:in `require_relative'
        from c:/Ruby22/lib/ruby/gems/2.2.0/gems/sshkit-1.7.1/lib/sshkit/all.rb:3
2:in `<top (required)>'
        from c:/Ruby22/lib/ruby/gems/2.2.0/gems/sshkit-1.7.1/lib/sshkit.rb:35:in
 `require_relative'
        from c:/Ruby22/lib/ruby/gems/2.2.0/gems/sshkit-1.7.1/lib/sshkit.rb:35:in
 `<top (required)>'
        from c:/Ruby22/lib/ruby/gems/2.2.0/gems/capistrano-3.4.0/lib/capistrano/
all.rb:2:in `require'
        from c:/Ruby22/lib/ruby/gems/2.2.0/gems/capistrano-3.4.0/lib/capistrano/
all.rb:2:in `<top (required)>'
        from c:/Ruby22/lib/ruby/gems/2.2.0/gems/capistrano-3.4.0/bin/cap:2:in `r
equire'
        from c:/Ruby22/lib/ruby/gems/2.2.0/gems/capistrano-3.4.0/bin/cap:2:in `<
top (required)>'
        from c:/Ruby22/bin/cap:23:in `load'
        from c:/Ruby22/bin/cap:23:in `<main>'

This seems to indicate I am missing some required gems but have setup the Gemfile as per screencast:


source 'https://rubygems.org'

gem 'capistrano', '~> 3.1'
gem 'capistrano-composer', '0.0.3'
gem 'capistrano-npm', '0.0.3'
gem 'capistrano-gulp', github: 'BRITEWEB/capistrano-gulp'

Can anyone please tell me where I am going wrong here?

It’s very difficult to try and read what you pasted. Words are wrapped and there is no formatting.

I fixed it up for him, well, mostly, there are still some indentation spaces.

It’s obviously some type of ruby issue - what operating system are you using? How did you install ruby?

I had some issues with ruby occasionally (OS X Yosemite and El Capitan) until I switched to installing Ruby via RVM (a system for installing and managing versions of ruby other than the version that comes pre-installed on Macs).

https://rvm.io/rvm/install

Thanks Kalen!

I am running git bash and installed Ruby using Windows installer here http://rubyinstaller.org/

It seems I am missing dependencies although have setup the gem file exactly as specified in Scott’s screencast, I am also running the latest version of ruby.

Other than running gem install composer and then bundle exec cap install is there anything I am missing?

Help is much appreciated guys :smile:

The screencast is a little older now, so I would use it as a guide. Bedrock’s Capistrano support has actually been broken out to here, so I would use this.

Googling that error leads to here: http://stackoverflow.com/a/28900142/590053

So add this to your Gemfile:

gem 'net-ssh', '2.9.3.beta1'

Thanks Scott that’s exactly what I needed to do and it’s working perfectly now, sorry you had to Google the answer for me (http://lmgtfy.com/)! Huge fan of roots and really appreciate everything you and the team have done, since adopting sage and bedrock my workflow has improved 10 fold - I will never look back!