rails credentials:edit seems to open, save and encrypt before I do anything

96 views
Skip to first unread message

Pito

unread,
Jul 1, 2018, 10:30:00 PM7/1/18
to Ruby on Rails: Talk

$ rails credentials:edit


displays this immediately:


New credentials encrypted and saved.


Before my editor window even opens. And the window then always opens with a blank page.

Any idea whats going on? 

Hassan Schroeder

unread,
Jul 1, 2018, 10:36:06 PM7/1/18
to rubyonrails-talk
19:31 ~/testcases/rails/rails-5-2/defaults:(scaffold-test)[ruby-2.5.1]$
rails credentials:edit
No $EDITOR to open file in. Assign one like this:

EDITOR="mate --wait" bin/rails credentials:edit

For editors that fork and exit immediately, it's important to pass a wait flag,
otherwise the credentials will be saved immediately with no chance to edit.
19:31 ~/testcases/rails/rails-5-2/defaults:(scaffold-test)[ruby-2.5.1]$

What editor are you using?

--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote

Pito

unread,
Jul 2, 2018, 1:53:59 PM7/2/18
to Ruby on Rails: Talk
Thanks. I am using vscode. But your suggestion worked as is for it too. Thank you!
Reply all
Reply to author
Forward
0 new messages