I am getting this issue only on my production and not on my local,
ActionController::MissingFile in Admin::BxBlockQuestionBankQuestionBanksController#download_sample_file
Cannot read file /home/projetc/Downloads/proj/ubuntu/Desktop/prominlabs-225755-ruby/template-app/template-app/spec/support/excel/new_sample_file.xlsx
Extracted source (around line #167):
I am getting this issue only on my production and not on my local, ActionController::MissingFile in Admin::BxBlockQuestionBankQuestionBanksController#download_sample_file Cannot read file /home/projetc/Downloads/proj/ubuntu/Desktop/prominlabs-225755-ruby/template-app/template-app/spec/support/excel/new_sample_file.xlsx Extracted source (around line #167):
collection_action :download_sample_file do new_file = "#{Rails.root}/spec/support/excel/new_sample_file1.xlsx" send_file(new_file, filename: 'sample_file.xlsx', type: 'application/xlsx')
end
this is the code :
and this is the way i am sending the file:
it's giving error at send_file that file not found