gpt4 book ai didi

ruby-on-rails - 我得到 "found character that cannot start any token while scanning for the next token"

转载 作者:数据小太阳 更新时间:2023-10-29 06:26:11 26 4
gpt4 key购买 nike

我已经在我的笔记本电脑上运行 Ruby on Rails 大约一个月了,但是当我想在这个实例中运行服务器时(它在几个小时前工作正常)我现在收到这条消息。请问如何让服务器再次运行?

C:\Sites\LaunchPage>rails s
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/psych.rb:203:in `parse': (<unknown>):
found character that cannot start any token while scanning for the next token at line 17 column 17 (Psych::SyntaxError)
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/psych.rb:203:in `parse_stream'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/psych.rb:151:in `parse'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/psych.rb:127:in `load'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/figaro-0.6.3/lib/figaro.rb:21:in `raw'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/figaro-0.6.3/lib/figaro.rb:17:in `env'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/figaro-0.6.3/lib/figaro/railtie.rb:7:in `block in <class:Railtie>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/lazy_load_hooks.rb:34:in `call'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/lazy_load_hooks.rb:34:in `execute_hook'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/lazy_load_hooks.rb:42:in `each'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/application.rb:67:in `inherited'
from C:/Sites/LaunchPage/config/application.rb:13:in `<module:LaunchPage>'
from C:/Sites/LaunchPage/config/application.rb:12:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:53:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:53:in `block in <top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:50:in `tap'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'

最佳答案

YAML 不接受 TAB 字符 (\t) 进行缩进。在您的 config/application.yml 中查找那些并替换为 2 个空格。

(或者可能存在其他语法错误,正如 Ryan 所建议的那样。但我敢打赌这个错误)

关于ruby-on-rails - 我得到 "found character that cannot start any token while scanning for the next token",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19356278/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com