質問編集履歴

2

エラー追記

2018/02/14 11:24

投稿

miiichat
miiichat

スコア72

test CHANGED
File without changes
test CHANGED
@@ -132,6 +132,74 @@
132
132
 
133
133
  ```
134
134
 
135
+ ```
136
+
137
+ $ heroku run rails db:seed
138
+
139
+ Running rails db:seed on ⬢ whispering-brook-22978... up, run.3009 (Free)
140
+
141
+ D, [2018-02-14T11:22:53.254427 #4] DEBUG -- : (3.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
142
+
143
+ rails aborted!
144
+
145
+ ActiveModel::UnknownAttributeError: unknown attribute 'admin' for User.
146
+
147
+ /app/vendor/bundle/ruby/2.3.0/gems/activemodel-5.1.4/lib/active_model/attribute_assignment.rb:48:in `_assign_attribute'
148
+
149
+ /app/vendor/bundle/ruby/2.3.0/gems/activemodel-5.1.4/lib/active_model/attribute_assignment.rb:40:in `block in _assign_attributes'
150
+
151
+ /app/vendor/bundle/ruby/2.3.0/gems/activemodel-5.1.4/lib/active_model/attribute_assignment.rb:39:in `each'
152
+
153
+ /app/vendor/bundle/ruby/2.3.0/gems/activemodel-5.1.4/lib/active_model/attribute_assignment.rb:39:in `_assign_attributes'
154
+
155
+ /app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/attribute_assignment.rb:26:in `_assign_attributes'
156
+
157
+ /app/vendor/bundle/ruby/2.3.0/gems/activemodel-5.1.4/lib/active_model/attribute_assignment.rb:33:in `assign_attributes'
158
+
159
+ /app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/core.rb:337:in `initialize'
160
+
161
+ /app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/inheritance.rb:66:in `new'
162
+
163
+ /app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/inheritance.rb:66:in `new'
164
+
165
+ /app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/persistence.rb:50:in `create!'
166
+
167
+ /app/db/seeds.rb:1:in `<top (required)>'
168
+
169
+ /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:286:in `load'
170
+
171
+ /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:286:in `block in load'
172
+
173
+ /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:258:in `load_dependency'
174
+
175
+ /app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:286:in `load'
176
+
177
+ /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/engine.rb:549:in `load_seed'
178
+
179
+ /app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/tasks/database_tasks.rb:270:in `load_seed'
180
+
181
+ /app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/railties/databases.rake:184:in `block (2 levels) in <top (required)>'
182
+
183
+ /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/commands/rake/rake_command.rb:21:in `block in perform'
184
+
185
+ /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/commands/rake/rake_command.rb:18:in `perform'
186
+
187
+ /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/command.rb:46:in `invoke'
188
+
189
+ /app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/commands.rb:16:in `<top (required)>'
190
+
191
+ /app/bin/rails:9:in `require'
192
+
193
+ /app/bin/rails:9:in `<main>'
194
+
195
+ Tasks: TOP => db:seed
196
+
197
+ (See full trace by running task with --trace)
198
+
199
+
200
+
201
+ ```
202
+
135
203
 
136
204
 
137
205
  ご回答お願いします!

1

コードの追記

2018/02/14 11:24

投稿

miiichat
miiichat

スコア72

test CHANGED
File without changes
test CHANGED
@@ -100,4 +100,38 @@
100
100
 
101
101
 
102
102
 
103
+ ```
104
+
105
+ ActiveRecord::Schema.define(version: 20180110193732) do
106
+
107
+
108
+
109
+ create_table "users", force: :cascade do |t|
110
+
111
+ t.string "name"
112
+
113
+ t.string "email"
114
+
115
+ t.datetime "created_at", null: false
116
+
117
+ t.datetime "updated_at", null: false
118
+
119
+ t.string "password_digest"
120
+
121
+ t.string "remember_digest"
122
+
123
+ t.boolean "admin", default: false
124
+
125
+ t.index ["email"], name: "index_users_on_email", unique: true
126
+
127
+ end
128
+
129
+
130
+
131
+ end
132
+
133
+ ```
134
+
135
+
136
+
103
137
  ご回答お願いします!