First, unless the root user has created the project, you don't
need "sudo" when running the script/generate command.
Second, the error that you're getting means that the environment
that hoptoad is setting up in order to check its configuration is
trying to connect to a database that doesn't exist. The rake
hoptoad:test task (which gets run by script/generate
hoptoad uses whatever environment you're in at the time, so
it's probable that you're missing your development database. Please
try rake db:create and then running
script/generate hoptoad again.