Originally posted October 15, 2009

I’ve been trying to do some stuff with ruby on rails and getting my program up and running here on coldandheartless. I had all kinds of trouble when I finally got to the deployment stage. The first errors I got were:

yo:site maryh$ cap deploy:setup
/Library/Ruby/Site/1.8/rubygems.rb:280:in `activate’: can’t activate net-sftp (= 1.1.0, runtime)
for [], already activated net-sftp-2.0.2 for ["capistrano-2.0.0"] (Gem::LoadError)
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:35:in `require’
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/
gems/capistrano-2.0.0/lib/capistrano/upload.rb:2
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require’
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require’
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/
capistrano-2.0.0/lib/capistrano/configuration/actions/file_transfer.rb:1
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require’
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require’
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/
capistrano-2.0.0/lib/capistrano/configuration.rb:12
… 7 levels…
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require’
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/
capistrano-2.0.0/bin/cap:3
from /usr/bin/cap:19:in `load’
from /usr/bin/cap:19

After screwing around for a very long time, I found that I seem to have some old versions of gems that were messing me up. And I when I tried to uninstall them, I got this error:

yo:gems root# gem uninstall capistrano -i /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
Remove executables:
cap, capify

in addition to the gem? [Yn] Y
ERROR: While executing gem … (Gem::FilePermissionError)
You don’t have write permissions into the /System/Library/Frameworks/Ruby.framework/
Versions/1.8/usr/lib/ruby/gems/1.8/bin directory.

So I went to go and look at the above directory and it’s true that I don’t have write permissions because there was no bin directory there at all. After I created the bin directory, I was able to uninstall the gems. So now I should be able to uninstall the old stuff and put the newest files on.