{"action":"created","issue":{"url":"https://api.github.com/repos/lookback/meteor-emails/issues/36","labels_url":"https://api.github.com/repos/lookback/meteor-emails/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/lookback/meteor-emails/issues/36/comments","events_url":"https://api.github.com/repos/lookback/meteor-emails/issues/36/events","html_url":"https://github.com/lookback/meteor-emails/issues/36","id":106905747,"number":36,"title":"Templates not found","user":{"login":"sean-stanley","id":3805164,"avatar_url":"https://avatars.githubusercontent.com/u/3805164?v=3","gravatar_id":"","url":"https://api.github.com/users/sean-stanley","html_url":"https://github.com/sean-stanley","followers_url":"https://api.github.com/users/sean-stanley/followers","following_url":"https://api.github.com/users/sean-stanley/following{/other_user}","gists_url":"https://api.github.com/users/sean-stanley/gists{/gist_id}","starred_url":"https://api.github.com/users/sean-stanley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sean-stanley/subscriptions","organizations_url":"https://api.github.com/users/sean-stanley/orgs","repos_url":"https://api.github.com/users/sean-stanley/repos","events_url":"https://api.github.com/users/sean-stanley/events{/privacy}","received_events_url":"https://api.github.com/users/sean-stanley/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-09-17T03:26:27Z","updated_at":"2015-09-19T17:03:44Z","closed_at":null,"body":"Hi,\r\n\r\nI know the readme and example are supposed to help me not have this problem, but despite trying to follow them very closely I still ended up with a strange bug where my templates aren't being found.\r\nI called console.log just before Mailer.init to see what my Templates variable actually was. Templates and Mailer.init are defined in the same .coffee file by the way.\r\n\r\n```\r\n{ \r\n  invoiceEmail: { path: 'invoice/invoice-email.html', name: 'invoiceEmail' },\r\n  confirmOrderEmail: { path: 'order/confirmation-email.html', name: 'confirmOrderEmail' },\r\n  subscriptionConfirmation: { path: 'order/subscription-confirmation-email.html', name: 'subscriptionConfirmation' },\r\n  hubReminder: { path: 'hub/hub-reminder.html', name: 'hubReminder' } \r\n}\r\n```\r\n\r\nI didn't actually define any name properties on my definitions. I assume that must be Mailer doing something in the background?\r\n\r\nAnyway, my integration test calls `Mailer.render('invoiceEmail', invoice)` and throws this error.\r\n\r\n`Error: Could not find template: invoiceEmail [500]`\r\n\r\nthe path for invoiceEmail is private/invoice/invoice-email.html and I had this working only two days ago. I'm still trying to determine if this happened because of something I did or something that was changed in meteor-emails. \r\n\r\nCheers,"},"comment":{"url":"https://api.github.com/repos/lookback/meteor-emails/issues/comments/141688038","html_url":"https://github.com/lookback/meteor-emails/issues/36#issuecomment-141688038","issue_url":"https://api.github.com/repos/lookback/meteor-emails/issues/36","id":141688038,"user":{"login":"mhinton","id":23145,"avatar_url":"https://avatars.githubusercontent.com/u/23145?v=3","gravatar_id":"","url":"https://api.github.com/users/mhinton","html_url":"https://github.com/mhinton","followers_url":"https://api.github.com/users/mhinton/followers","following_url":"https://api.github.com/users/mhinton/following{/other_user}","gists_url":"https://api.github.com/users/mhinton/gists{/gist_id}","starred_url":"https://api.github.com/users/mhinton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhinton/subscriptions","organizations_url":"https://api.github.com/users/mhinton/orgs","repos_url":"https://api.github.com/users/mhinton/repos","events_url":"https://api.github.com/users/mhinton/events{/privacy}","received_events_url":"https://api.github.com/users/mhinton/received_events","type":"User","site_admin":false},"created_at":"2015-09-19T17:03:44Z","updated_at":"2015-09-19T17:03:44Z","body":"It looks like templates can't be found in the Velocity test environment. I am using mocha and I get the following log messages when the application starts up in the mirror environment.  However I have no issues actually sending the emails.\r\n\r\nAdd route: [previewB11_1] at path /emails/previewbid_received mailer\r\nAdd route: [sendB11_1] at path /emails/sendbid_received mailer\r\n(STDERR) Could not read template file: bid_received.html mailer\r\nAdd route: [previewDealerNotification] at path /emails/previewdealer_notification mailer\r\nAdd route: [sendDealerNotification] at path /emails/senddealer_notification mailer\r\nAdd route: [previewReminderAppointment] at path /emails/previewreminder_appointment mailer\r\n(STDERR) Could not read template file: dealer_notification.html mailer\r\nAdd route: [sendReminderAppointment] at path /emails/sendreminder_appointment mailer\r\nAdd route: [previewReminderAppointmentDealer] at path /emails/previewreminder_appointment_dealer mailer\r\nAdd route: [sendReminderAppointmentDealer] at path /emails/sendreminder_appointment_dealer mailer\r\n(STDERR) Could not read template file: reminder_appointment.html mailer\r\n(STDERR) Could not read template file: reminder_appointment_dealer.html mailer\r\n\r\nThen when a test runs I get this message.\r\n\r\nMailer.send:  { to: 'guest@2wav.com',\r\n  subject: 'I\\'ve got your bid!',\r\n  template: 'B11_1',\r\n  data:\r\n   { dealerId: 'ASDF QEWRTY' } }\r\n(STDERR) Could not render email before sending: Could not find template: B11_1 [500] mailer\r\n\r\n"}}