I am trying to instal varnish on a cache server. My following stack with be…
HA Proxy Servers —-> Cache (Varnish) Servers —-> Nginx + Unicorn Servers
I have been able to correctly setup all the config files for HAProxy and Varnish to move traffic along the pipeline. However I get an error when try to bootstrap my cache servers.
** ERROR: While executing gem ... (Gem::DependencyError)
** Unable to resolve dependencies: rubber requires net-ssh (~> 2.4.0); fog requires net-ssh (>= 2.1.3); capistrano requires net-ssh (>= 2.0.14); net-ssh-gateway requires net-ssh (>= 2.6.4); net-scp requires net-ssh (>= 2.6.4); net-sftp requires net-ssh (>= 2.6.4)
** /tmp/gem_helper:32:in `block in <main>'
** : Unable to install versioned gem rubber:2.1.2 (RuntimeError
** )
** from /tmp/gem_helper:30:in `each'
** from /tmp/gem_helper:30:in `<main>'
I can’t seem to figure out why this is happening. Any help would be great. Thanks
I had this problem and the solution I found was somewhat unsatisfactory and temporary, but it worked.
This error occurs during the
rubber:install_gemstask. After it fails, log into the ec2 server via ssh. At this point if you try to rungem install rubber -v=2.1.2manually in the remote console, it fails with the exact same error you show above. (the version number might be different for you, it depends on the rubber version you had when you did this).So now create an empty folder with any name, and create an almost-empty Gemfile inside it.
Then fill the Gemfile with the following contents:
Again, the version of rubber might be different for you.
After creating this file, run
bundle installand everything will install correctly. But don’t ask me why it works differently when installing rubber via bundler than installing it via a plain oldgem install.So after achieving this, logout from ec2 and re-run
cap rubber:bootstrapand it should work.The unsatisfactory part is that if you decide to create new instances on ec2, it will fail again at the same point, and you’ll have to repeat this steps and re-ignite the process manually for it to complete. So if any one can come up with a better solution like modifying rubber or something, let us know.