Thank you @Steven_Murawski for correcting me on the ruby_block and I was able to test the "print java path" block. I referred to "resource_env" and it seems to be more applicable for windows environment and in my case I was trying to set the path on redhat 6.7 version. when I log on to the box after the chef-client, I still can't find the $PATH appended with "/usr/bin/java".when I check the path, I only observe
env | grep PATH PATH=/sbin:/bin:/usr/sbin:/usr/bin
and for some reason "/usr/bin/java" doesn't get applied even after the ruby_block executes successfully in my recipe.I was installing the java binary with "yum install java-1.7.0-openjdk-devel" before setting the environment PATH through the ruby_block and after the installation I observed the binary installed to the following path, but it did not get added to $PATH. could you advise how this can be resolved in linux environment, i was able to use bash resource along with `export PATH=$PATH:/usr/bin/java', but i wouldn't wanted to use that but prefer other ways to use.thanks for your time