Rail YML debug: Psych::SyntaxError... at line xxx column y

紅寶鐵軌客
Join to follow...
Follow/Unfollow Writer: 紅寶鐵軌客
By following, you’ll receive notifications when this author publishes new articles.
Don't wait! Sign up to follow this writer.
WriterShelf is a privacy-oriented writing platform. Unleash the power of your voice. It's free!
Sign up. Join WriterShelf now! Already a member. Login to WriterShelf.
寫程式中、折磨中、享受中 ......
870   0  
·
2017/12/16
·
1 mins read


這個 Rails 的 YML Bug 非常非常難找,我剛又遇上了,等到我找到這隻蟲後,才恍然想起,哈,這我以前也遇到,所以,就特留了個紀錄於此,希望對以後有同此遭遇的 rails 同“苦”,有幫助!

基本上,只要你的 YML 有錯,排錯、文法錯誤、多個冒號、⋯⋯ 您都會看到這個 Psync Systax Error,說真的,剛看到還真會被 Psych 嚇到,這不是說“精神有毛病吧⋯⋯”

好啦,講重點,是的,是 YML 有問題,有錯誤確定,但是後面說的行號是錯的,而且真的錯誤是在「後面」,注意~~~ 是「後面」,這真的會氣死人,抓了一輩子的蟲,要想到蟲在後面,還真是“沒辦法”想到啊!我這次的例子還差了快五十行,帥吧~

留個紀錄,下次不用再被嚇到!後面有鬼~~

 


WriterShelf™ is a unique multiple pen name blogging and forum platform. Protect relationships and your privacy. Take your writing in new directions. ** Join WriterShelf**
WriterShelf™ is an open writing platform. The views, information and opinions in this article are those of the author.


Article info

Categories:
Tags:
Date:
Published: 2017/12/16 - Updated: 2017/12/16
Total: 228 words


Share this article:
About the Author

很久以前就是個「寫程式的」,其實,什麼程式都不熟⋯⋯
就,這會一點點,那會一點點⋯⋯




Join the discussion now!
Don't wait! Sign up to join the discussion.
WriterShelf is a privacy-oriented writing platform. Unleash the power of your voice. It's free!
Sign up. Join WriterShelf now! Already a member. Login to WriterShelf.