{"issue":{"created_at":"2011-07-13T07:36:52Z","state":"open","updated_at":"2011-11-20T02:04:02Z","user":{"gravatar_id":"865192faed17824a4060b9345e9a5bf9","id":137030,"url":"https://api.github.com/users/cameel","login":"cameel","avatar_url":"https://secure.gravatar.com/avatar/865192faed17824a4060b9345e9a5bf9?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"comments":4,"body":"gettext is using deprecated method Gem.all_load_paths from RubyGems. This makes 'rake gettext:find' crash in the process of generating locale files. \r\n\r\nI fixed it, but my fix depends on newer version of RubyGems (obviously, deprecated calls had to be replaced with their newer alternatives). You may want to pull it anyway so I make this pull request.","assignee":null,"id":1213985,"number":11,"pull_request":{"patch_url":"https://github.com/mutoh/gettext/pull/11.patch","html_url":"https://github.com/mutoh/gettext/pull/11","diff_url":"https://github.com/mutoh/gettext/pull/11.diff"},"labels":[],"title":"Fix rubygems deprecations","closed_at":null,"html_url":"https://github.com/mutoh/gettext/issues/11","milestone":null,"url":"https://api.github.com/repos/mutoh/gettext/issues/11"},"action":"created","comment":{"created_at":"2011-11-20T02:04:02Z","updated_at":"2011-11-20T02:04:02Z","user":{"gravatar_id":"b3c7791c6997f281fe845ffe987a4313","id":1207474,"url":"https://api.github.com/users/ichelm","login":"ichelm","avatar_url":"https://secure.gravatar.com/avatar/b3c7791c6997f281fe845ffe987a4313?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"I also wrote another patch for this issue. This probably works with any version of Rubygems.\r\n\r\n```\r\n--- lib/gettext/runtime/locale_path.rb.orig\r\n+++ lib/gettext/runtime/locale_path.rb\r\n@@ -52,7 +52,14 @@\r\n        \r\n         load_path = $LOAD_PATH.dup\r\n         if defined? ::Gem\r\n-          load_path += Gem.all_load_paths\r\n+          begin\r\n+            load_path +=Gem::Specification.map{|s|s.gem_dir}\r\n+          rescue NoMethodError\r\n+            begin\r\n+              load_path +=Gem.all_load_paths\r\n+            rescue NoMethodError\r\n+            end\r\n+          end\r\n         end\r\n         load_path.map!{|v| v.match(/(.*?)(\\/lib)*?$/); $1}\r\n         load_path.each {|path|\r\n```","id":2802109,"url":"https://api.github.com/repos/mutoh/gettext/issues/comments/2802109"}}