no such file to load — capistrano/ext/multistage
I ran into this error the other day when running “cap -T”
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require’: no such file to load — capistrano/ext/multistage (LoadError)
So to fix this l did the following
sudo gem uninstall capistrano
sudo rm -rf /usr/bin/cap
sudo gem install capistrano-ext
sudo gem install capistrano
Needed to do “sudo rm -rf /usr/bin/cap” as doing just the uninstall of capistrano didn’t remove all the files l needed it to.
Restarting your rails application after deployment on Passenger
This is something that l always forget to add the first time l deploy my rails applications that run on Apache + Passenger.
namespace :deploy do
desc "Restarting mod_rails with restart.txt"
task :restart, :roles => :app, :except => { :no_release => true } do
run "touch #{current_path}/tmp/restart.txt"
end
[:start, :stop].each do |t|
desc "#{t} task is a no-op with mod_rails"
task t, :roles => :app do ; end
end
end
This will tell Capistrano to restart the server the passenger way by touching the restart.txt file in the tmp dir rather then trying to restart using mongrel. Lets hope l don’t forget next time




