ERROR: RuntimeError: Please set EDITOR environment variable


#1

I’ve the latest chef 10.16.2

When I issue the following cmd:

knife data bag create db creds --secret-file ~/.chef/encrypted_data_bag_secret

opens the vim and I write some configs and when I try to :wq (write n exit) it says

ERROR: RuntimeError: Please set EDITOR environment variable

I’ve even set the EDITOR var inline as well

EDITOR=/usr/bin/vim knife data bag create db creds --secret-file ~/.chef/encrypted_data_bag_secret

Still the same error.

There is a issue filed and which says its been resolved at http://tickets.opscode.com/browse/CHEF-1340

But why I’m getting this error?


@millisami
~ Sachin Sagar Rai
Ruby on Rails Developer
http://tfm.com.np
http://nepalonrails.tumblr.com
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)


#2

try to

export EDITOR=vim

2012/11/3 Sachin Sagar Rai millisami@gmail.com

I’ve the latest chef 10.16.2

When I issue the following cmd:

knife data bag create db creds --secret-file
~/.chef/encrypted_data_bag_secret

opens the vim and I write some configs and when I try to :wq (write n
exit) it says

ERROR: RuntimeError: Please set EDITOR environment variable

I’ve even set the EDITOR var inline as well

EDITOR=/usr/bin/vim knife data bag create db creds --secret-file
~/.chef/encrypted_data_bag_secret

Still the same error.

There is a issue filed and which says its been resolved at
http://tickets.opscode.com/browse/CHEF-1340

But why I’m getting this error?


@millisami
~ Sachin Sagar Rai
Ruby on Rails Developer
http://tfm.com.np
http://nepalonrails.tumblr.com
Sent with Sparrow http://www.sparrowmailapp.com/?sig


#3

Type export EDITOR=“vim” before issuing the command and for a permanent
solution add it into your bash profile.

Mobile Jens

3 nov 2012 kl. 15:23 skrev Sachin Sagar Rai millisami@gmail.com:

I’ve the latest chef 10.16.2

When I issue the following cmd:

knife data bag create db creds --secret-file
~/.chef/encrypted_data_bag_secret

opens the vim and I write some configs and when I try to :wq (write n exit)
it says

ERROR: RuntimeError: Please set EDITOR environment variable

I’ve even set the EDITOR var inline as well

EDITOR=/usr/bin/vim knife data bag create db creds --secret-file
~/.chef/encrypted_data_bag_secret

Still the same error.

There is a issue filed and which says its been resolved at
http://tickets.opscode.com/browse/CHEF-1340

But why I’m getting this error?


@millisami
~ Sachin Sagar Rai
Ruby on Rails Developer
http://tfm.com.np
http://nepalonrails.tumblr.com
Sent with Sparrow http://www.sparrowmailapp.com/?sig


#4

export EDITOR=vim
millisami at millisami in ~/chef-app
± knife data bag create db creds --secret-file ~/.chef/encrypted_data_bag_secret
Data bag db already exists
ERROR: RuntimeError: Please set EDITOR environment variable

Even tried inline:

± EDITOR=vim knife data bag create db creds --secret-file ~/.chef/encrypted_data_bag_secret
Data bag db already exists
ERROR: RuntimeError: Please set EDITOR environment variable


@millisami
~ Sachin Sagar Rai
Ruby on Rails Developer
http://tfm.com.np
http://nepalonrails.tumblr.com
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

On Saturday, November 3, 2012 at 8:09 PM, Akzhan Abdulin wrote:

try to

export EDITOR=vim

2012/11/3 Sachin Sagar Rai <millisami@gmail.com (mailto:millisami@gmail.com)>

I’ve the latest chef 10.16.2

When I issue the following cmd:

knife data bag create db creds --secret-file ~/.chef/encrypted_data_bag_secret

opens the vim and I write some configs and when I try to :wq (write n exit) it says

ERROR: RuntimeError: Please set EDITOR environment variable

I’ve even set the EDITOR var inline as well

EDITOR=/usr/bin/vim knife data bag create db creds --secret-file ~/.chef/encrypted_data_bag_secret

Still the same error.

There is a issue filed and which says its been resolved at http://tickets.opscode.com/browse/CHEF-1340

But why I’m getting this error?


@millisami
~ Sachin Sagar Rai
Ruby on Rails Developer
http://tfm.com.np
http://nepalonrails.tumblr.com
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)


#5

The EDITOR is an unix/linux eviromental variable. If you echo $EDITOR in
bash it should say vim. Else type the export command on one line then the
knife command on the next.

Mobile Jens

3 nov 2012 kl. 15:27 skrev Sachin Sagar Rai millisami@gmail.com:

export EDITOR=vim

millisami at millisami in ~/chef-app
± knife data bag create db creds --secret-file
~/.chef/encrypted_data_bag_secret
Data bag db already exists
ERROR: RuntimeError: Please set EDITOR environment variable

Even tried inline:

± EDITOR=vim knife data bag create db creds --secret-file
~/.chef/encrypted_data_bag_secret
Data bag db already exists
ERROR: RuntimeError: Please set EDITOR environment variable


@millisami
~ Sachin Sagar Rai
Ruby on Rails Developer
http://tfm.com.np
http://nepalonrails.tumblr.com
Sent with Sparrow http://www.sparrowmailapp.com/?sig

On Saturday, November 3, 2012 at 8:09 PM, Akzhan Abdulin wrote:

try to

export EDITOR=vim

2012/11/3 Sachin Sagar Rai millisami@gmail.com

I’ve the latest chef 10.16.2

When I issue the following cmd:

knife data bag create db creds --secret-file
~/.chef/encrypted_data_bag_secret

opens the vim and I write some configs and when I try to :wq (write n exit)
it says

ERROR: RuntimeError: Please set EDITOR environment variable

I’ve even set the EDITOR var inline as well

EDITOR=/usr/bin/vim knife data bag create db creds --secret-file
~/.chef/encrypted_data_bag_secret

Still the same error.

There is a issue filed and which says its been resolved at
http://tickets.opscode.com/browse/CHEF-1340

But why I’m getting this error?


@millisami
~ Sachin Sagar Rai
Ruby on Rails Developer
http://tfm.com.np
http://nepalonrails.tumblr.com
Sent with Sparrow http://www.sparrowmailapp.com/?sig