2015-06-03 1 views
0

Когда я вхожу грабли БД: семя в терминале, я получаю:грабли БД: семенные дает синтаксис ошибка, неожиданный « п», ожидая =>

SyntaxError: /Users/-/src/-/db/seeds.rb:17: syntax error, unexpected '\n', expecting =>

Tasks: TOP => db:seed

... где дб/seeds.rb имеет :

Category.create(kind: 'Food/Drink')  #line 9, everything above is commented out 
Category.create(kind: 'Entertainment') 
Category.create(kind: 'Organization') 
Category.create(kind: 'Business') 
Category.create(kind: 'Collegiate') 

Location.create(area: 'Downtown NB') 
Location.create(area: 'College Ave', 
Location.create(area: 'Cook/Douglass')  #line 17 
Location.create(area: 'Livingston') 
Location.create(area: 'Busch') 
Location.create(area: 'Surrounding NB') 
Location.create(area: 'Out of Town') 

--trace показывает:

rake db:seed --trace

** Invoke db:seed (first_time)

** Execute db:seed

** Invoke db:abort_if_pending_migrations (first_time)

** Invoke environment (first_time)

** Execute environment

** Execute db:abort_if_pending_migrations

rake aborted!

SyntaxError: /Users/EuphoriaComplex/src/venture/venture/db/seeds.rb:17: syntax error, unexpected '\n', expecting =>

ответ

4

у вас есть опечатка на линии 16:

Location.create(area: 'College Ave', 

должен быть

Location.create(area: 'College Ave') 
Смежные вопросы