# Shef fails to run if I use a run\_action

**URL:** <https://discourse.chef.io/t/shef-fails-to-run-if-i-use-a-run-action/1788>\
**Category:** Chef Infra (archive)\
**Created:** [April 21, 2011, 7:52pm UTC](https://discourse.chef.io/t/shef-fails-to-run-if-i-use-a-run-action/1788 "2011-04-21T19:52:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Alberts](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/john_alberts/32/293_2.png) [@John\_Alberts](https://discourse.chef.io/u/John_Alberts)\
**Post date:** [April 21, 2011, 7:52pm UTC](https://discourse.chef.io/t/shef-fails-to-run-if-i-use-a-run-action/1788/1 "2011-04-21T19:52:54Z")

</div>

I’ve found a need to use run\_action in one of my cookbook recipes to ensure  
that a particular file is created before chef moves on. It seems this  
breaks the ability to use shef, which sucks, because I use it all of the  
time for debugging, etc.

This is the code that shef error out on.

e _=_ template “/etc/sysconfig/exlsysteminfo” _do_

source “exlsysteminfo.erb”

mode “0644”

action :nothing

variables(

```
        :cnames *=>* `host #{node*.*ipaddress} | grep -v 'NXDOMAIN' |

```

awk ‘{print $5}’`\*.\*split

```
        )

```

_end_

e\*.\*run\_action(:create)

I have a gist of this code and error messages from shef versions 0.9.12,  
0.9.14, 0.9.16. I noticed 0.9.12 has a more informative error message than  
newer releases and helped me track the problem down to this section of code.

Here is the gist: [https://gist.github.com/54e6f39586219aac0307](https://gist.github.com/54e6f39586219aac0307)

Any idea what I can do to get shef to work again?

–  
John Alberts
