0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

[Rails エラー] unexpected tIDENTIFIER

Posted at

はじめに

よく出るエラーです。

いちおメモします :snowman2:

問題

Rspecのテストを書いているときにエラーが起きてしまいました。


SyntaxError:
  /Users/namae/projects/picapp/spec/models/user_spec.rb:8: syntax error, unexpected tIDENTIFIER, expecting end
  ...'ユーザー新規登録' do
  ...                          ^~~~~
  /Users/namae/projects/picapp/spec/models/user_spec.rb:20: syntax error, unexpected end, expecting end-of-input
    end
    ^~~

調べた結果

「SyntaxError」とはじめにあるように構文のエラーです。
カンマが抜けていたり空白が足りなかったり全角スペースがあったり・・
                         するとエラーが発生します。

まとめ

よくあってはいけないのですが・・気をつけなくてはいけないですね。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?