Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I'm getting "found character that cannot start any token while scanning for the next token"

I have been running Ruby on Rails on my laptop for about a month now, but when I wanted to run the server in this instance (and it was working fine a few hours ago) I now receive this message. How can I get the server to run again please?

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>' 
like image 589
asaignment Avatar asked Oct 14 '13 08:10

asaignment


2 Answers

YAML does not accept TAB characters (\t) for indentation. Look for those in your config/application.yml and replace with 2 spaces.

(or there may be other syntax errors, as suggested by Ryan. But I'm betting on this one)

like image 88
Sergio Tulentsev Avatar answered Oct 16 '22 12:10

Sergio Tulentsev


This error is originating from the Figaro gem, which would indicate to me that you probably have a syntax error in config/application.yml. Double check this file for any incorrect YAML syntax.

like image 35
Ryan Bigg Avatar answered Oct 16 '22 14:10

Ryan Bigg