{"action":"opened","issue":{"url":"https://api.github.com/repos/thuss/standalone-migrations/issues/149","repository_url":"https://api.github.com/repos/thuss/standalone-migrations","labels_url":"https://api.github.com/repos/thuss/standalone-migrations/issues/149/labels{/name}","comments_url":"https://api.github.com/repos/thuss/standalone-migrations/issues/149/comments","events_url":"https://api.github.com/repos/thuss/standalone-migrations/issues/149/events","html_url":"https://github.com/thuss/standalone-migrations/issues/149","id":381178238,"node_id":"MDU6SXNzdWUzODExNzgyMzg=","number":149,"title":"db seeds","user":{"login":"ConorSheehan1","id":16896053,"node_id":"MDQ6VXNlcjE2ODk2MDUz","avatar_url":"https://avatars3.githubusercontent.com/u/16896053?v=4","gravatar_id":"","url":"https://api.github.com/users/ConorSheehan1","html_url":"https://github.com/ConorSheehan1","followers_url":"https://api.github.com/users/ConorSheehan1/followers","following_url":"https://api.github.com/users/ConorSheehan1/following{/other_user}","gists_url":"https://api.github.com/users/ConorSheehan1/gists{/gist_id}","starred_url":"https://api.github.com/users/ConorSheehan1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ConorSheehan1/subscriptions","organizations_url":"https://api.github.com/users/ConorSheehan1/orgs","repos_url":"https://api.github.com/users/ConorSheehan1/repos","events_url":"https://api.github.com/users/ConorSheehan1/events{/privacy}","received_events_url":"https://api.github.com/users/ConorSheehan1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-15T14:12:12Z","updated_at":"2018-11-15T14:12:12Z","closed_at":null,"author_association":"NONE","body":"```bundle exec rake db:seed``` fails with\r\n\r\n```\r\nrake aborted!\r\nNoMethodError: undefined method `[]' for nil:NilClass\r\n/home/$user/.rbenv/versions/2.4.4/bin/bundle:23:in `load'\r\n/home/$user/.rbenv/versions/2.4.4/bin/bundle:23:in `<main>'\r\nTasks: TOP => db:seed\r\n```\r\n\r\nIt looks like the issue is that `db_namespace` is `nil`. I think in rails it's development by default.\r\n\r\n```\r\n(byebug) step\r\n\r\n[188, 197] in /home/$user/.rbenv/versions/2.4.4/lib/ruby/gems/2.4.0/gems/activerecord-5.2.1/lib/active_record/railties/databases.rake\r\n   188:   desc \"Creates the database, loads the schema, and initializes with the seed data (use db:reset to also drop the database first)\"\r\n   189:   task setup: [\"db:schema:load_if_ruby\", \"db:structure:load_if_sql\", :seed]\r\n   190: \r\n   191:   desc \"Loads the seed data from db/seeds.rb\"\r\n   192:   task :seed do\r\n=> 193:     db_namespace[\"abort_if_pending_migrations\"].invoke\r\n   194:     ActiveRecord::Tasks::DatabaseTasks.load_seed\r\n   195:   end\r\n   196: \r\n   197:   namespace :fixtures do\r\n(byebug) db_namespace\r\nnil\r\n```\r\n"}}
{"actor":{"display_login":"ConorSheehan1"}}