空的,不可编辑的pg_hba.conf文件

lak*_*are 10 authentication postgresql sinatra

我正在尝试使用本教程将我的Sinatra应用程序连接到PostgreSQL数据库:http://samuelstern.wordpress.com/2012/11/28/making-a-simple-database-driven-website-with-sinatra-and-heroku /.一切顺利,直到我尝试执行:

rake:db migrate
Run Code Online (Sandbox Code Playgroud)

然后我收到这个错误:

rake aborted!
PG::ConnectionBad: fe_sendauth: no password supplied
Run Code Online (Sandbox Code Playgroud)

好像我应该在pg_hba.conf文件中更改我的权限,但是,打开它,我什么也看不见.并且,如果我尝试在其中写入内容,它会说它是" 只读 ".

我是否正确摆脱错误以及下一步该走向何方?

编辑:实际上,如果我尝试从另一个文本编辑器打开它,它说我没有权限.

lak*_*are 23

所以pg_hba.conf是空的,因为我试图用SublimeText打开它,而sublime并没有告诉我我不被允许读它,它只是向我展示了一个空文件.
要编辑pg_hba.conf,我需要通过终端打开它

/etc/postgresql/9.3/main$ sudo subl pg_hba.conf
Run Code Online (Sandbox Code Playgroud)

与sudo.