Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ArgumentError: Write key must be initialized Rails

Hi I'm new to Rails and I'm using nitrous.io as my IDE.

I just generated a model using rails generate model Micropost content:text user:references

When I run bundle exec rake db:migrate I get the following error: ArgumentError: Write key must be initialized.

Any help with this will be greatly appreciated.

like image 306
Thomas Calhoun Jr. Avatar asked Dec 25 '22 05:12

Thomas Calhoun Jr.


1 Answers

Are you using Segment's ruby gem by any chance? It happened to me too and it turned out it was a Segment misconfiguration. The API key was missing.

See the docs: https://github.com/segmentio/analytics-ruby#usage

And this is where the error is fired: https://github.com/segmentio/analytics-ruby/blob/master/lib/segment/analytics/client.rb#L336

like image 131
pierrea Avatar answered Dec 26 '22 17:12

pierrea