Please try the following:
<%= simple_form_for @project do |f| %>
<%= render inline: @erb_code, locals: {f: f} %>
<% end %>
i.e., without using ERB.new. Add more locals as the need be.
In past I have used render inline for similar purposes in Rails 3.2.13.