0

每当我运行命令时rvmsudo rake db:migrate(我需要使用rvmsudo,因为我使用的是 rvm),生成的 sqlite3 文件归 root 所有。

ls -l db/*.sqlite3

因此,每当我尝试对数据库执行任何操作时,我都会不断收到 SQLite3 只读错误,并且我必须手动输入命令:

sudo chown -R myusername db/*.sqlite3

rvmsudo rake db:migrate以前从未这样做过,我想知道为什么现在会发生这种情况。

4

1 回答 1

2

Did you install RVM as root, and if so, is there a reason it wasn't installed as your normal (less-privileged) user? I use RVM daily, on a number of machines, and haven't had to install RVM as root.

于 2011-05-31T21:55:50.960 回答