LoginSignup
0
0

More than 1 year has passed since last update.

ActiveRecord::StatementInvalid: Mysql2::Error: Specified key was too long; max key length is 767 bytes エラー

Posted at

 Railsでアプリ作成時、rails db:migrateのコマンドの後、
Mysql2::Error: Specified key was too long; max key length is 767 bytes
というエラーが出る場合がある。
そんなときは、

<変更前>
/config/database.yml
image.png

<変更後>
/config/database.yml
image.png

上記のように、databaseのencodingのところを修正することで、エラー解決ができる可能性がある。

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