【发布时间】:2018-03-13 23:34:51
【问题描述】:
我正在制作一个与漫画书有关的 RoR 应用程序,但在使用 rails db:seed 命令后我不断收到此错误:
rails aborted!
SyntaxError:
/Users/cggarcia171/Desktop/environment/ComicApp/db/seeds.rb:9: syntax
error, unexpected tLABEL
ch1 = Character.create (alias:'Doctor Manhattan', name: 'Dr.
^
/Users/cggarcia171/Desktop/environment/ComicApp/db/seeds.rb:9: syntax
error, unexpected ',', expecting end-of-input
ate (alias:'Doctor Manhattan', name: 'Dr. Jonathan 'Jon' Ost
^
这是我的一些代码:
ch1 = Character.create
(alias:'Doctor Manhattan',
name: "Dr. Jonathan 'Jon' Osterman",
image: 'Doctor_Manhattan.jpg',
bio: 'He was originally
Dr. Jonathan Osterman, a nuclear physicist who in 1959 was transformed
into one of the most supreme beings of DC Comics, after initially being
disintegrated in an Intrinsic Field Subtractor and later reconstructing
himself. Following his reanimation, he was immediately pressed into
service by the United States government, who gave him the name Doctor
Manhattan, after the Manhattan Project. He is the only character in the
story that possesses actual superpowers.')
等
【问题讨论】:
标签: ruby-on-rails command-line terminal