In texstudio, the right procedures to compile your document do this steps:
- compile ‘main.tex’ using latex or pdflatex
- compile ‘main.tex’ (NOT ‘ref.bib’) using bibtex => this step will generate main.aux file
- compile twice ‘main.tex’ using latex or pdflatex
Otherwise, you may find your bib list not updated or get errors like:
I couldn’t open file name `bibi.aux’
Source: http://tex.stackexchange.com/questions/166831/cant-open-reference-aux