uhlenbrock / dinner_dash

Training project for IMS 422/522
2 stars 4 forks source link

adding seed data #1

Open Stewarkr opened 10 years ago

Stewarkr commented 10 years ago

I can't get the command rake db:seed to work. When I run it I get different responses, but the last one I got said: /home/action/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-4.0.3/lib/active_record/transactions.rb:281:in rollback_active_record_state!' /home/action/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-4.0.3/lib/active_record/transactions.rb:269:insave'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-4.0.3/lib/active_record/persistence.rb:37:in create' /home/action/dinner_dash/db/seeds.rb:13:in<top (required)>'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:223:in load' /home/action/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:223:inblock in load'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:214:in load_dependency' /home/action/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:223:inload'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.3/lib/rails/engine.rb:540:in load_seed' /home/action/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-4.0.3/lib/active_record/tasks/database_tasks.rb:154:inload_seed'
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-4.0.3/lib/active_record/railties/databases.rake:181:in block (2 levels) in <top (required)>' /home/action/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:ineval'
/home/action/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `

'
Tasks: TOP => db:seed
(See full trace by running task with --trace)

I can't really make sense of all of this, but do you know what it may mean? If not, maybe we can get together tomorrow afternoon to figure it out?

Thanks!

uhlenbrock commented 10 years ago

It looks like one of your records may be invalid. The error message mentions line 13 of your seeds file. If that doesn't lead you anywhere I'd be happy to screenshare this afternoon.

On Tue, Mar 18, 2014 at 10:32 PM, Stewarkr notifications@github.com wrote:

I can't get the command rake db:seed to work. When I run it I get different responses, but the last one I got said: /home/action/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-4.0.3/lib/active_record/transactions.rb:281:in rollback_active_record_state!'

/home/action/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-4.0.3/lib/active_record/transactions.rb:269:in save'

/home/action/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-4.0.3/lib/active_record/persistence.rb:37:in create' /home/action/dinner_dash/db/seeds.rb:13:in'

/home/action/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:223:in load'

/home/action/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:223:inblock in load'

/home/action/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:214:in load_dependency'

/home/action/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.3/lib/active_support/dependencies.rb:223:in load'

/home/action/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.3/lib/rails/engine.rb:540:in load_seed'

/home/action/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-4.0.3/lib/active_record/tasks/database_tasks.rb:154:in load_seed'

/home/action/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-4.0.3/lib/active_record/railties/databases.rake:181:in block (2 levels) in <top (required)>' /home/action/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:ineval'

/home/action/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `'

Tasks: TOP => db:seed

(See full trace by running task with --trace)

I can't really make sense of all of this, but do you know what it may mean? If not, maybe we can get together tomorrow afternoon to figure it out?

Thanks!

Reply to this email directly or view it on GitHubhttps://github.com/uhlenbrock/dinner_dash/issues/1 .

Stewarkr commented 10 years ago

Sorry, I didn't get to sit down and work with it until later than expected, but I still don't know what is wrong. Will you be around tomorrow? I am free after 11:30. Also, can I still work on implementing the cart or should I wait until this issue is resolved?

uhlenbrock commented 10 years ago

I'm free tomorrow as well. Feel free to skip the seeds for now and move on to the other homework.

-- Bobby (Sent from my iPhone)

On Mar 19, 2014, at 7:53 PM, Stewarkr notifications@github.com wrote:

Sorry, I didn't get to sit down and work with it until later than expected, but I still don't know what is wrong. Will you be around tomorrow? I am free after 11:30. Also, can I still work on implementing the cart or should I wait until this issue is resolved?

Reply to this email directly or view it on GitHubhttps://github.com/uhlenbrock/dinner_dash/issues/1#issuecomment-38121705 .

uhlenbrock commented 10 years ago

I just had an idea. If you add me as a collaborator on your Nitrous.io box, I think I can just log in and take a look at the issue. Then I could let you know what's up.

On Wed, Mar 19, 2014 at 7:54 PM, Bobby Uhlenbrock bobby@helloample.comwrote:

I'm free tomorrow as well. Feel free to skip the seeds for now and move on to the other homework.

-- Bobby (Sent from my iPhone)

On Mar 19, 2014, at 7:53 PM, Stewarkr notifications@github.com wrote:

Sorry, I didn't get to sit down and work with it until later than expected, but I still don't know what is wrong. Will you be around tomorrow? I am free after 11:30. Also, can I still work on implementing the cart or should I wait until this issue is resolved?

Reply to this email directly or view it on GitHubhttps://github.com/uhlenbrock/dinner_dash/issues/1#issuecomment-38121705 .

Stewarkr commented 10 years ago

Awesome! I'll do that now

On Thu, Mar 20, 2014 at 10:56 AM, Bobby Uhlenbrock <notifications@github.com

wrote:

I just had an idea. If you add me as a collaborator on your Nitrous.io box, I think I can just log in and take a look at the issue. Then I could let you know what's up.

On Wed, Mar 19, 2014 at 7:54 PM, Bobby Uhlenbrock <bobby@helloample.com

wrote:

I'm free tomorrow as well. Feel free to skip the seeds for now and move on to the other homework.

-- Bobby (Sent from my iPhone)

On Mar 19, 2014, at 7:53 PM, Stewarkr notifications@github.com wrote:

Sorry, I didn't get to sit down and work with it until later than expected, but I still don't know what is wrong. Will you be around tomorrow? I am free after 11:30. Also, can I still work on implementing the cart or should I wait until this issue is resolved?

Reply to this email directly or view it on GitHub< https://github.com/uhlenbrock/dinner_dash/issues/1#issuecomment-38121705> .

Reply to this email directly or view it on GitHubhttps://github.com/uhlenbrock/dinner_dash/issues/1#issuecomment-38176719 .

Katie Stewart Student at Miami University Major: Graphic Design Minors: Marketing and Interactive Media Studies

uhlenbrock commented 10 years ago

I found the issue:

/home/action/dinner_dash/app/models/order.rb:17:in `minimum_items_count'

errors.add(:items, 'must have at least one') unless items > 0

It's unable to compare an integer with a collection. Add size or count to items to compare two integers.

errors.add(:items, 'must have at least one') unless items.count > 0
Stewarkr commented 10 years ago

That helped! Now it is talking about validating locale?

action@dinnerdashkatie-84147:~/dinnerdash (master)$ rake db:seed [deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message. action@dinnerdashkatie-84147:~/dinnerdash(master)$

On Thu, Mar 20, 2014 at 12:02 PM, Bobby Uhlenbrock <notifications@github.com

wrote:

I found the issue:

/home/action/dinner_dash/app/models/order.rb:17:in `minimum_items_count'

errors.add(:items, 'must have at least one') unless items > 0

It's unable to compare an integer with a collection. Add size or count to items to compare two integers.

errors.add(:items, 'must have at least one') unless items.count > 0

Reply to this email directly or view it on GitHubhttps://github.com/uhlenbrock/dinner_dash/issues/1#issuecomment-38185564 .

Katie Stewart Student at Miami University Major: Graphic Design Minors: Marketing and Interactive Media Studies

uhlenbrock commented 10 years ago

That can safely be ignored.

-- Bobby (Sent from my iPhone)

On Mar 20, 2014, at 12:14 PM, Stewarkr notifications@github.com wrote:

That helped! Now it is talking about validating locale?

action@dinnerdashkatie-84147:~/dinnerdash (master)$ rake db:seed [deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message. action@dinnerdashkatie-84147:~/dinnerdash(master)$

On Thu, Mar 20, 2014 at 12:02 PM, Bobby Uhlenbrock <notifications@github.com

wrote:

I found the issue:

/home/action/dinner_dash/app/models/order.rb:17:in `minimum_items_count'

errors.add(:items, 'must have at least one') unless items > 0

It's unable to compare an integer with a collection. Add size or count to items to compare two integers.

errors.add(:items, 'must have at least one') unless items.count > 0

Reply to this email directly or view it on GitHub< https://github.com/uhlenbrock/dinner_dash/issues/1#issuecomment-38185564> .

Katie Stewart Student at Miami University Major: Graphic Design Minors: Marketing and Interactive Media Studies

Reply to this email directly or view it on GitHubhttps://github.com/uhlenbrock/dinner_dash/issues/1#issuecomment-38187124 .

Stewarkr commented 10 years ago

Awesome! Not to be a pain, but I am also having trouble with my sign out and create order functions. Could you see why?

On Thu, Mar 20, 2014 at 12:35 PM, Bobby Uhlenbrock <notifications@github.com

wrote:

That can safely be ignored.

-- Bobby (Sent from my iPhone)

On Mar 20, 2014, at 12:14 PM, Stewarkr notifications@github.com wrote:

That helped! Now it is talking about validating locale?

action@dinnerdashkatie-84147:~/dinner_dash (master*)$ rake db:seed

[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message. action@dinnerdashkatie-84147:~/dinner_dash(master*)$

On Thu, Mar 20, 2014 at 12:02 PM, Bobby Uhlenbrock < notifications@github.com

wrote:

I found the issue:

/home/action/dinner_dash/app/models/order.rb:17:in `minimum_items_count'

errors.add(:items, 'must have at least one') unless items > 0

It's unable to compare an integer with a collection. Add size or count to items to compare two integers.

errors.add(:items, 'must have at least one') unless items.count > 0

Reply to this email directly or view it on GitHub< https://github.com/uhlenbrock/dinner_dash/issues/1#issuecomment-38185564> .

Katie Stewart

Student at Miami University Major: Graphic Design Minors: Marketing and Interactive Media Studies

Reply to this email directly or view it on GitHub< https://github.com/uhlenbrock/dinner_dash/issues/1#issuecomment-38187124>

.

Reply to this email directly or view it on GitHubhttps://github.com/uhlenbrock/dinner_dash/issues/1#issuecomment-38189762 .

Katie Stewart Student at Miami University Major: Graphic Design Minors: Marketing and Interactive Media Studies

uhlenbrock commented 10 years ago

I will take a look first thing tomorrow!

-- Bobby (Sent from my iPhone)

On Mar 20, 2014, at 12:46 PM, Stewarkr notifications@github.com wrote:

Awesome! Not to be a pain, but I am also having trouble with my sign out and create order functions. Could you see why?

On Thu, Mar 20, 2014 at 12:35 PM, Bobby Uhlenbrock <notifications@github.com

wrote:

That can safely be ignored.

-- Bobby (Sent from my iPhone)

On Mar 20, 2014, at 12:14 PM, Stewarkr notifications@github.com wrote:

That helped! Now it is talking about validating locale?

action@dinnerdashkatie-84147:~/dinner_dash (master*)$ rake db:seed

[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message. action@dinnerdashkatie-84147:~/dinner_dash(master*)$

On Thu, Mar 20, 2014 at 12:02 PM, Bobby Uhlenbrock < notifications@github.com

wrote:

I found the issue:

/home/action/dinner_dash/app/models/order.rb:17:in `minimum_items_count'

errors.add(:items, 'must have at least one') unless items > 0

It's unable to compare an integer with a collection. Add size or count to items to compare two integers.

errors.add(:items, 'must have at least one') unless items.count > 0

Reply to this email directly or view it on GitHub< https://github.com/uhlenbrock/dinner_dash/issues/1#issuecomment-38185564> .

Katie Stewart

Student at Miami University Major: Graphic Design Minors: Marketing and Interactive Media Studies

Reply to this email directly or view it on GitHub< https://github.com/uhlenbrock/dinner_dash/issues/1#issuecomment-38187124>

.

Reply to this email directly or view it on GitHub< https://github.com/uhlenbrock/dinner_dash/issues/1#issuecomment-38189762> .

Katie Stewart Student at Miami University Major: Graphic Design Minors: Marketing and Interactive Media Studies

Reply to this email directly or view it on GitHubhttps://github.com/uhlenbrock/dinner_dash/issues/1#issuecomment-38191081 .

uhlenbrock commented 10 years ago

It looks like you may need to start your Nitrous.io box before I can log in to it.

On Thu, Mar 20, 2014 at 5:45 PM, Bobby Uhlenbrock bobby@helloample.comwrote:

I will take a look first thing tomorrow!

-- Bobby (Sent from my iPhone)

On Mar 20, 2014, at 12:46 PM, Stewarkr notifications@github.com wrote:

Awesome! Not to be a pain, but I am also having trouble with my sign out and create order functions. Could you see why?

On Thu, Mar 20, 2014 at 12:35 PM, Bobby Uhlenbrock < notifications@github.com

wrote:

That can safely be ignored.

-- Bobby (Sent from my iPhone)

On Mar 20, 2014, at 12:14 PM, Stewarkr notifications@github.com wrote:

That helped! Now it is talking about validating locale?

action@dinnerdashkatie-84147:~/dinner_dash (master*)$ rake db:seed

[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message. action@dinnerdashkatie-84147:~/dinner_dash(master*)$

On Thu, Mar 20, 2014 at 12:02 PM, Bobby Uhlenbrock < notifications@github.com

wrote:

I found the issue:

/home/action/dinner_dash/app/models/order.rb:17:in `minimum_items_count'

errors.add(:items, 'must have at least one') unless items > 0

It's unable to compare an integer with a collection. Add size or count to items to compare two integers.

errors.add(:items, 'must have at least one') unless items.count > 0

Reply to this email directly or view it on GitHub< https://github.com/uhlenbrock/dinner_dash/issues/1#issuecomment-38185564

.

Katie Stewart

Student at Miami University Major: Graphic Design Minors: Marketing and Interactive Media Studies

Reply to this email directly or view it on GitHub< https://github.com/uhlenbrock/dinner_dash/issues/1#issuecomment-38187124

.

Reply to this email directly or view it on GitHub< https://github.com/uhlenbrock/dinner_dash/issues/1#issuecomment-38189762> .

Katie Stewart Student at Miami University Major: Graphic Design Minors: Marketing and Interactive Media Studies

Reply to this email directly or view it on GitHubhttps://github.com/uhlenbrock/dinner_dash/issues/1#issuecomment-38191081 .

Stewarkr commented 10 years ago

Okay, I did.

On Fri, Mar 21, 2014 at 9:06 AM, Bobby Uhlenbrock notifications@github.comwrote:

It looks like you may need to start your Nitrous.io box before I can log in to it.

On Thu, Mar 20, 2014 at 5:45 PM, Bobby Uhlenbrock <bobby@helloample.com

wrote:

I will take a look first thing tomorrow!

-- Bobby (Sent from my iPhone)

On Mar 20, 2014, at 12:46 PM, Stewarkr notifications@github.com wrote:

Awesome! Not to be a pain, but I am also having trouble with my sign out and create order functions. Could you see why?

On Thu, Mar 20, 2014 at 12:35 PM, Bobby Uhlenbrock < notifications@github.com

wrote:

That can safely be ignored.

-- Bobby (Sent from my iPhone)

On Mar 20, 2014, at 12:14 PM, Stewarkr notifications@github.com wrote:

That helped! Now it is talking about validating locale?

action@dinnerdashkatie-84147:~/dinner_dash (master*)$ rake db:seed

[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message. action@dinnerdashkatie-84147:~/dinner_dash(master*)$

On Thu, Mar 20, 2014 at 12:02 PM, Bobby Uhlenbrock < notifications@github.com

wrote:

I found the issue:

/home/action/dinner_dash/app/models/order.rb:17:in `minimum_items_count'

errors.add(:items, 'must have at least one') unless items > 0

It's unable to compare an integer with a collection. Add size or count to items to compare two integers.

errors.add(:items, 'must have at least one') unless items.count > 0

Reply to this email directly or view it on GitHub<

https://github.com/uhlenbrock/dinner_dash/issues/1#issuecomment-38185564

.

Katie Stewart

Student at Miami University Major: Graphic Design Minors: Marketing and Interactive Media Studies

Reply to this email directly or view it on GitHub<

https://github.com/uhlenbrock/dinner_dash/issues/1#issuecomment-38187124

.

Reply to this email directly or view it on GitHub< https://github.com/uhlenbrock/dinner_dash/issues/1#issuecomment-38189762

.

Katie Stewart Student at Miami University Major: Graphic Design Minors: Marketing and Interactive Media Studies

Reply to this email directly or view it on GitHub< https://github.com/uhlenbrock/dinner_dash/issues/1#issuecomment-38191081> .

Reply to this email directly or view it on GitHubhttps://github.com/uhlenbrock/dinner_dash/issues/1#issuecomment-38274089 .

Katie Stewart Student at Miami University Major: Graphic Design Minors: Marketing and Interactive Media Studies

Stewarkr commented 10 years ago

Also, my flight today has been delayed, so I can come to class this morning.

On Fri, Mar 21, 2014 at 9:18 AM, Stewart, Kaitlin stewarkr@miamioh.eduwrote:

Okay, I did.

On Fri, Mar 21, 2014 at 9:06 AM, Bobby Uhlenbrock < notifications@github.com> wrote:

It looks like you may need to start your Nitrous.io box before I can log in to it.

On Thu, Mar 20, 2014 at 5:45 PM, Bobby Uhlenbrock <bobby@helloample.com

wrote:

I will take a look first thing tomorrow!

-- Bobby (Sent from my iPhone)

On Mar 20, 2014, at 12:46 PM, Stewarkr notifications@github.com wrote:

Awesome! Not to be a pain, but I am also having trouble with my sign out and create order functions. Could you see why?

On Thu, Mar 20, 2014 at 12:35 PM, Bobby Uhlenbrock < notifications@github.com

wrote:

That can safely be ignored.

-- Bobby (Sent from my iPhone)

On Mar 20, 2014, at 12:14 PM, Stewarkr notifications@github.com wrote:

That helped! Now it is talking about validating locale?

action@dinnerdashkatie-84147:~/dinner_dash (master*)$ rake db:seed

[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message. action@dinnerdashkatie-84147:~/dinner_dash(master*)$

On Thu, Mar 20, 2014 at 12:02 PM, Bobby Uhlenbrock < notifications@github.com

wrote:

I found the issue:

/home/action/dinner_dash/app/models/order.rb:17:in `minimum_items_count'

errors.add(:items, 'must have at least one') unless items > 0

It's unable to compare an integer with a collection. Add size or count to items to compare two integers.

errors.add(:items, 'must have at least one') unless items.count > 0

Reply to this email directly or view it on GitHub<

https://github.com/uhlenbrock/dinner_dash/issues/1#issuecomment-38185564

.

Katie Stewart

Student at Miami University Major: Graphic Design Minors: Marketing and Interactive Media Studies

Reply to this email directly or view it on GitHub<

https://github.com/uhlenbrock/dinner_dash/issues/1#issuecomment-38187124

.

Reply to this email directly or view it on GitHub<

https://github.com/uhlenbrock/dinner_dash/issues/1#issuecomment-38189762>

.

Katie Stewart Student at Miami University Major: Graphic Design Minors: Marketing and Interactive Media Studies

Reply to this email directly or view it on GitHub< https://github.com/uhlenbrock/dinner_dash/issues/1#issuecomment-38191081> .

Reply to this email directly or view it on GitHubhttps://github.com/uhlenbrock/dinner_dash/issues/1#issuecomment-38274089 .

Katie Stewart Student at Miami University Major: Graphic Design Minors: Marketing and Interactive Media Studies

Katie Stewart Student at Miami University Major: Graphic Design Minors: Marketing and Interactive Media Studies