Add setup_ruby_environment action type
cleanup & bugfix for R environment