This project is archived and is in readonly mode.
actionmailer 2.3.9 should now require 'uri'
-
ronin-116156 (at lighthouseapp)
Hi Hans. I don't see your patch attached to this ticket.
-
Hans de Graaff
Oops. Patch attached.
-
David Trasbo
- State changed from new to open
- Importance changed from to Low
Hans,
Could you please attach a patch according to the guidelines outlined here?
https://rails.lighthouseapp.com/projects/8994/sending-patches
Thanks! :)
-
Ryan Bigg
@David: I think that if the tests aren't running then isn't them then running enough? What in the guidelines has he missed?
@OP: For additional points: Is it just
rake testand it breaks from within actionmailer? Nothing else magical? -
David Trasbo
Hans and Ryan,
Perhaps I could have been more clear. :)
What's missing is to format the patch using
format-patchto include commit message, author, etc. -
Tom Stuart
This bug prevented our app from bootstrapping when we upgraded to 2.3.9, possibly because of load order, so it's not just a test issue. Can the priority be made higher, please?
-
David Trasbo
- Importance changed from Low to Medium
Done.
Hans, please attach a patch according to the guidelines or will. Consider yourself warned. :)
-
Hans de Graaff
I won't be adding a patch according to the guidelines, because I'm not convinced that this is the right approach to fixing it, even if it fixes the symptom. I'd rather see the owners of those components decide what the best way to fix this is. I've included my original patch to indicate exactly where the symptom surfaces.
-
Ryan Bigg
Hans, the correct approach to fixing it would be to put this require at the top of actionmailer/lib/action_mailer/base.rb with the other requires. Please write a patch to do this so that it is attributed to you.
-
Geoff Buesing
I had opened a duplicate ticket for this -- #5760 Missing require in action_controller/url_rewriter -- and Ryan Bigg asked me to attach my patch to this one.
My patch adds require 'uri' to the top of action_controller/url_rewriter, which is where it ultimately belongs, because this is the file that depends on URI, not action_mailer/base.
I consider this a high priority fix -- the framework won't boot correctly if you configure ActionMailer in your environment. In my case, I was configuring ActionMailer only in my production environment, which meant I deployed code (after upgrading to Rails 2.3.9) that worked in development and test, but wouldn't boot in production.
-
Rohit Arondekar
- Milestone set to 2.3.10
- Assigned user set to José Valim
- Importance changed from Medium to High
-
Hans de Graaff
I agree that it is much better to fix this issue in ActionController instead.
-
Geoff Buesing
Ok, I inspected my app a little more and realized that I was doing something unconventional -- I was setting ActionMailer settings in config/environments/production.rb directly on the constant, like so:
ActionMailer::Base.smtp_settings = { # settings }instead of the correct way for environment files:
config.action_mailer.smtp_settings = { # settings }Additionally, I was opting out of ActiveResource, which requires 'uri':
config.active_resource -= [:active_resource]This non-conventional config + ActiveResource opt-out is probably why this issue has not been discovered by more users.
So, not as high-priority an issue as I first thought, though this should still be fixed.
-
David Trasbo
- Importance changed from High to Medium
-
David Trasbo
- Assigned user changed from José Valim to Santiago Pastorino
-
Santiago Pastorino
- Assigned user changed from Santiago Pastorino to Mikel Lindsaar
-
David Trasbo
Santiago,
Same as #3431 ActionMailer does not return correctly to respond_to? with deliver_ prefix - except it's a very minor change. I think you should just go ahead and apply this. If you have time?
-
Repository
- State changed from open to resolved
(from [f2e32e4fd7332d61324daaf33e99fd7f2e8e4c2a]) require 'uri' in action_controller/url_rewriter [#5555 actionmailer 2.3.9 should now require 'uri' state:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/f2e32e4fd7332d61324daaf33e99fd...
