Nov 24
To delete all files in the current directory, you run the extremely dangerous
rm *
and
rm -rf *
to recursively remove all files and directories.
However, the command has a 128K buffer limitation in the Linux Kernel. As a workaround you can pipe each file to rm like so:
find . -name ‘*’ | xargs rm
See this article for details.
Nov 24
If you get the “Could not connect to the server” error running you project from Netbeans while script/server works fine, first make sure you have the correct Rails version set for your project, it should show “Installed version: 2.2.2”:

If you still get:
Rails requires RubyGems >= 1.3.1 (you have 1.2.0). Please `gem update –system` and try again.
But the suggested
gem update —system
often fails to update your gem to the new version so try
sudo gem install rubygems-update
and then run:
sudo gem install rubygems-update
and check with
gem -v
where it should show 1.3.1 at the time of writing.
Nov 16
First and foremost, read this document and follow it meticulously. If you get this error:
unable to chdir or not a git archive
fatal: The remote end hung up unexpectedly
after running
cap deploy:cold
you might have to add the public key of the deploy user you set up with
set :user, “deploy”
in your capistrano deploy.rb file, to the /home/git/.ssh/authorized_keys on the REMOTE server.
Of course gitosis has a special process managing the keys and users from the LOCAL machine in the ~/gitosis/gitosis-admin directory, so you to have copy the public key you generated for the deploy user on your REMOTE server via
ssh-keygen -t rsa
to your LOCAL machine (via scp or cut and paste into a new deploy.pub file from the ssh shell for example) and then proceed as outlined here (under “Adding Users”):
cd ~/gitosis/gitosis-admin
cp ~/deploy.pub keydir/
git add keydir/deploy.pub
Add the user credentials to the gitosis.conf file:
[group myrailsteam]
writable = myrailsapp
members = deploy
Finally run
git commit -a -m “Granted deploy user access rights to myrailsapp”
git push
Now the cap deploy:cold should work (with one fewer errors that is
).
Recent Comments