Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spec creating tmp file on circleCI is failing

I have rspec test which creates a tmp file and it is read in the test. CircleCI fails saying

Failure/Error: file_name = generate_csv_file(items)
 Errno::ENOENT:
   No such file or directory @ rb_sysopen - /home/ubuntu/project/tmp/batch_1443573588.csv
like image 733
yatish mehta Avatar asked Sep 30 '15 00:09

yatish mehta


1 Answers

CricleCi by default does not have tmp directory for rails projects.

Your options are to:

  • use system /tmp
  • add tmp to git repository
  • add post checkout hook in circle.yml that will create it
like image 76
piotrze Avatar answered Oct 03 '22 00:10

piotrze