Gem push

Had this error:

$ gem push -V pmd-1.3.0.gem
302 Moved Temporarily
304 Not Modified
Pushing gem to
403 Forbidden
You do not have permission to push to this gem.

While the credentials file in ~/.gems/credentials was certainly setup right, the error turned out to be that there was already a gem with that name and the push command was trying to write to that one instead. Renaming the gem fixed this.

Rake default tasks

Adding the followin lines to the Rakefile will catch the situation where you type in $ rake without any parameters and cover any accidental other task.

It will basically list the tasks available.

task :default do
  system "rake --tasks"



Serve the current working directory on a webserver:

$ ruby -run -e httpd . -p 8080