-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NoMethodError: undefined method `message' #39
Comments
I am having the same problem under ruby 1.9.3 |
Can you post a code example? And can you upgrade and try the newest gem version? |
I am also having this issue on Ruby 1.9.3 using 0.3.0. folder = "/home/refriedchicken/downloads" NoMethodError: undefined method |
Hi, I solved with code below. The ruby version is ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.2.0] File.open(File.join("imgs", file.filename), "w+b", 0644 ) { |f| f.write file.body.decoded } Thank's |
I am too face the same problem. I have using ruby 2.0.0-p247 and ruby-gmail-0.3.0. |
I got the same problem, it appears the save_attachments_to method doesnt exist or has been deprecated by the mail gem. I was able to handle my attachments like so message.attachments.each do |attachment| source: https://github.com/mikel/mail#testing-and-extracting-attachments |
Seems that in version 0.3.0 author made method 'message' private. At master I see that this method is public, so I assume that it was done mistakenly. For fast fixing this we can use send: |
@rcho's method doesn't work for me, which makes sense since it's still relying on the message method. I had no better results using emails.send(:message).save_attachments_to(folder). I get undefined method `save_attachments_to' for #Mail::Message:0x00000101469608 |
@Dreyfuzz @dolgishev I've merged a PR that updated the README. Can you try to save the attachments manually? The #save_attachments_to method was very out of date and the new example should work. |
I get this error when i try to download attachments from any email. I've alredy try ruby 1.9.2 and 1.8.7.
The text was updated successfully, but these errors were encountered: