ruby on rails - An error occurred while installing net-ssh (3.0.2), and Bundler cannot continue -


i want deploy rails app aws using capistrano , followed tutorial is.

here's tutorial: http://www.sitepoint.com/deploy-your-rails-app-to-aws/

however, domain showing 502 bad gateway nginx/1.4.6 (ubuntu).

in fact, each time run 'cap production deploy', error:

sshkit::runner::executeerror: exception while executing deploy@(my ip add): bundle exit status: 5 bundle stdout: error occurred while installing net-ssh (3.0.2), , bundler cannot continue. make sure `gem install net-ssh -v '3.0.2'` succeeds before bundling. bundle stderr: nothing written  sshkit::command::failed: bundle exit status: 5 bundle stdout: error occurred while installing net-ssh (3.0.2), , bundler cannot continue. make sure `gem install net-ssh -v '3.0.2'` succeeds before bundling. bundle stderr: nothing written  tasks: top => deploy:updated => bundler:install (see full trace running task --trace) deploy has failed error: exception while executing deploy@52.25.50.168: bundle exit status: 5 bundle stdout: error occurred while installing net-ssh (3.0.2), , bundler cannot continue. make sure `gem install net-ssh -v '3.0.2'` succeeds before bundling. bundle stderr: nothing written 

i'm sure net-ssh gem installation had succeeded (on both local , server side) dont know causing issue here, hope here can me.

thanks in advance!

update

what i've tried: sudo apt-get install ruby-net-ssh

my ubuntu server gem list:

deploy user's:

*** local gems ***  bigdecimal (1.2.6) bundler (1.8.4) bundler-unload (1.0.2) executable-hooks (1.3.2) gem-wrappers (1.2.7) io-console (0.4.3) jruby-pageant (1.1.1) json (1.8.1) minitest (5.4.3) net-ssh (3.0.2) pg (0.17.1) power_assert (0.2.2) psych (2.0.8) rake (10.4.2) rdoc (4.2.0) rubygems-bundler (1.4.4) rvm (1.11.3.9) test-unit (3.0.8) 

default server's:

*** local gems ***  bigdecimal (1.2.4) io-console (0.4.2) jruby-pageant (1.1.1) json (1.8.1) minitest (4.7.5) net-ssh (3.0.2) psych (2.0.5) rake (10.1.0) rdoc (4.1.0) test-unit (2.1.5.0) 

and i'm still getting exact same error per above running cap production deploy.

someone save me :(

ran same issue morning, not sure our solutions same here how fixed it.

i running mint 17 (ubuntu 14.04) got me ruby 1.9.3 when installing ruby package.

first encountered error net-ssh requires ruby version >= 2.0 installed ruby 2.2 source , bundler.

kept getting same error though manually installed net-ssh 3.0.2 manually fine.

turns out bundler still referencing ruby 1.9.1 library paths causing problem.

to fix ran following commands:

sudo apt-get remove ruby ruby1.9.1 bundler sudo apt-get autoremove # clean removed ruby packages sudo gem install bundler 

then able run bundler install , got no errors.

hope helps.


Comments