You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to use mail in a non-rubygems environment i.e. with Rip:
$ ruby -r mail -e ''
No such file or directory - /Users/bozo/.rip/irb/lib/mail/../../VERSION.yml (Errno::ENOENT)
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/yaml.rb:143:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/yaml.rb:143:in `load_file'
from /Users/bozo/.rip/irb/lib/mail/version.rb:6:in `version'
This happens because other non-rubygems environments can't find a VERSION.yml that exists in a project's top level directory. As explained in the ruby packaging standard, libraries must place all of their runtime code in its namespace under lib/. In the case of mail, all runtime code should be in mail.rb or lib/mail/.
My suggestion is to simply keep the versioning in lib/mail/version.rb and get rid of VERSION.yml. Here's a sample branch you could pull from to fix this: http://github.com/cldwalker/mail/tree/version I kept the versioning exactly how you like i.e. Mail::VERSION.version. To make it simpler, I would suggest just making it Mail::VERSION as I do with my projects.
I realize you have a number of tickets to look through but remember that until this gets fixed, mail won't work outside of rubygems and I'll have to maintain a functional fork for myself and others. Feel free to ask me to update the patch as you'd like and send a pull request.
Thanks for this gem,
Gabriel
The text was updated successfully, but these errors were encountered:
Thanks for making the change. Works in rip now! I'd suggest in the future putting versioning within your namespace i.e. lib/mail/, as suggested by the ruby packaging standard. Rip follows this standard closely and thus unpacks gems in the same lib/. If two gems have a lib/VERSION, one gem ends up overwriting the other's.
When trying to use mail in a non-rubygems environment i.e. with Rip:
$ ruby -r mail -e ''
This happens because other non-rubygems environments can't find a VERSION.yml that exists in a project's top level directory. As explained in the ruby packaging standard, libraries must place all of their runtime code in its namespace under lib/. In the case of mail, all runtime code should be in mail.rb or lib/mail/.
My suggestion is to simply keep the versioning in lib/mail/version.rb and get rid of VERSION.yml. Here's a sample branch you could pull from to fix this: http://github.com/cldwalker/mail/tree/version I kept the versioning exactly how you like i.e. Mail::VERSION.version. To make it simpler, I would suggest just making it Mail::VERSION as I do with my projects.
I realize you have a number of tickets to look through but remember that until this gets fixed, mail won't work outside of rubygems and I'll have to maintain a functional fork for myself and others. Feel free to ask me to update the patch as you'd like and send a pull request.
Thanks for this gem,
Gabriel
The text was updated successfully, but these errors were encountered: