Ruby on rails 意外标记:在heroku上的JSON中,在本地运行良好

Ruby on rails 意外标记:在heroku上的JSON中,在本地运行良好,ruby-on-rails,json,heroku,Ruby On Rails,Json,Heroku,所涉行: render(json: {'token': token} ) and return /app/app/controllers/authentications_controller.rb:29:语法错误,意外“:”,预期=> 呈现(json:{'token':token})并返回 我能 局部情况很好 给出了什么?{'token':token}在Ruby中不起作用(但),对于字符串键,您必须使用{'token'=>token}。我不知道,但我会尝试将:更改为。如果你在很多地方都有这段代

所涉行:

render(json: {'token': token} ) and return
/app/app/controllers/authentications_controller.rb:29:语法错误,意外“:”,预期=> 呈现(json:{'token':token})并返回

我能

局部情况很好


给出了什么?

{'token':token}
在Ruby中不起作用(但),对于字符串键,您必须使用
{'token'=>token}

我不知道,但我会尝试将
更改为
。如果你在很多地方都有这段代码,那么可能没有。
rails s