8

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
1
  • 1
    Is the TMPDIR environment variable set in your CircleCI environment? If you're not sure, ssh to a build instance and echo $TMPDIR. Also, please show your code that creates the temp file. Commented Feb 19, 2016 at 14:37

1 Answer 1

5

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
1
  • 2
    Both links are broken now
    – diralik
    Commented Mar 15, 2019 at 0:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.