{"action":"created","issue":{"url":"https://api.github.com/repos/rubygems/rubygems/issues/1118","labels_url":"https://api.github.com/repos/rubygems/rubygems/issues/1118/labels{/name}","comments_url":"https://api.github.com/repos/rubygems/rubygems/issues/1118/comments","events_url":"https://api.github.com/repos/rubygems/rubygems/issues/1118/events","html_url":"https://github.com/rubygems/rubygems/issues/1118","id":53417839,"number":1118,"title":"'gem generate_index' command doesn't fail if it can't write index files","user":{"login":"coofercat","id":2212225,"avatar_url":"https://avatars.githubusercontent.com/u/2212225?v=3","gravatar_id":"","url":"https://api.github.com/users/coofercat","html_url":"https://github.com/coofercat","followers_url":"https://api.github.com/users/coofercat/followers","following_url":"https://api.github.com/users/coofercat/following{/other_user}","gists_url":"https://api.github.com/users/coofercat/gists{/gist_id}","starred_url":"https://api.github.com/users/coofercat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coofercat/subscriptions","organizations_url":"https://api.github.com/users/coofercat/orgs","repos_url":"https://api.github.com/users/coofercat/repos","events_url":"https://api.github.com/users/coofercat/events{/privacy}","received_events_url":"https://api.github.com/users/coofercat/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rubygems/rubygems/labels/type%20-%20bug","name":"type - bug","color":"e10c02"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-05T17:01:13Z","updated_at":"2015-11-04T03:48:42Z","closed_at":"2015-11-04T03:48:42Z","body":"Due to various permissions and ownership issues, \"gem generate_index\" claimed to run fine, but actually created an unusable repo.\r\n\r\nI just tried to run \"gem generate_index .\" as a non-root user in a gem directory that had an unwritable (to me) 'quick' directory. The gem command output was normal (see below) but trying to install a new gem resulted in:\r\n```\r\nERROR:  Could not find a valid gem 'rails' (>= 0), here is why:\r\n          Unable to download data from http://gemserver.local/ruby-gems-repository/ - bad response Not Found 404 (http://gemserver.local/ruby-gems-repository/quick/Marshal.4.8/rails-4.2.0.gemspec.rz)\r\nERROR:  Possible alternatives: rails\r\n```\r\n\r\nIs there some overly broad exception catching going on somewhere? Can 'gem' be made to barf (even in an ugly way) if any of the critical files aren't written because of permissions, ownerships or disk full?\r\n\r\nThe output of the 'gem generate_index' was:\r\n```\r\nGenerating Marshal quick index gemspecs for 225 gems\r\n.................................................................................................................................................................................................................................\r\nComplete\r\nGenerated Marshal quick index gemspecs: 0.105s\r\nGenerating specs index\r\nGenerated specs index: 0.004s\r\nGenerating latest specs index\r\nGenerated latest specs index: 0.002s\r\nGenerating prerelease specs index\r\nGenerated prerelease specs index: 0.000s\r\nCompressing indicies\r\nCompressed indicies: 0.001s\r\n```\r\nResolution (for me) was to chown all the files to my non-root user and tore-run 'gem generate_index' (which gave much the same output once again, but correctly setup the files in the 'quick' directory)."},"comment":{"url":"https://api.github.com/repos/rubygems/rubygems/issues/comments/153562808","html_url":"https://github.com/rubygems/rubygems/issues/1118#issuecomment-153562808","issue_url":"https://api.github.com/repos/rubygems/rubygems/issues/1118","id":153562808,"user":{"login":"djberg96","id":78529,"avatar_url":"https://avatars.githubusercontent.com/u/78529?v=3","gravatar_id":"","url":"https://api.github.com/users/djberg96","html_url":"https://github.com/djberg96","followers_url":"https://api.github.com/users/djberg96/followers","following_url":"https://api.github.com/users/djberg96/following{/other_user}","gists_url":"https://api.github.com/users/djberg96/gists{/gist_id}","starred_url":"https://api.github.com/users/djberg96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djberg96/subscriptions","organizations_url":"https://api.github.com/users/djberg96/orgs","repos_url":"https://api.github.com/users/djberg96/repos","events_url":"https://api.github.com/users/djberg96/events{/privacy}","received_events_url":"https://api.github.com/users/djberg96/received_events","type":"User","site_admin":false},"created_at":"2015-11-04T03:48:42Z","updated_at":"2015-11-04T03:48:42Z","body":"@bronzdoc Ok, closing."}}