I receive this error with my contact form in rails:
First argument in form cannot contain nil or be empty
View:
If in fact your instance variable is supposed to be nil, you could use
:contact instead of @contact and provide a path.
In your case, the code should be,
<%= form_for( :contact , :html => {:class => "form-horizontal", :role => "form"}, url: login_path) do |form| %>
The login_path is just an example and can be replaced as seen fit.