I'm trying to search for the existence of the following line in a file;
default_mimetype = "text/html"
and then if found uncommented-out as above, then comment it out like so;
;default_mimetype = "text/html"
I currently have the following Chef recipe;
ruby_block "php_ini" do
file = Chef::Util::FileEdit.new("/etc/php.ini")
file.search_file_replace_line(/default_mimetype = "text/html"/, ';default_mimetype = "text/html"')
service "apache2" do
but the file_search_replace_line line is causing a syntax error (probably due to the "s & the ; ) How do I need to write this line so that it does what I want?