Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

properly installing simple_form with ruby on rails and bootstrap, and making changes with simple form installed

Hey everybody, I just installed simple_form through terminal properly (my terminal feedback matched that of the Lesson Video), or at least I think I did, and when I try to change the first line in my <treebook/app/views/statuses/_form.html.erb> which reads

<%= form_for(@status) do |f| %> to <%= simple_form_for(@status) do |f| %> I get an error message saying there is something wrong with the latter. The former, Ie the original code, loads fine.

thanks for the previous help guys!

4 Answers

undefined method `simple_form_for' for #<#<Class:0x00000101757310>:0x0000010232d608> Extracted source (around line #1):

The error code is the following

1: <%= simple_form_for(@status) do |f| %> 2: <% if @status.errors.any? %> 3: <div id="error_explanation"> 4: <h2><%= pluralize(@status.errors.count, "error") %> prohibited this status from being saved:</h2> Trace of template inclusion: app/views/statuses/new.html.erb

Rails.root: /Users/walker/treebook

it should be noted I can load anything but localhost:3000/statuses/new

I figured it out, I had to reboot terminal and restart the installation process. So for the next guy, if you have the same problem as me, restart terminal and retype in rails generate simple_form:install and rails generate simple_form:install --bootstrap, naturally making sure you are in the proper directory

Thanks man, that worked for me. I actually used one terminal tab to run the server, and another tab to install simple form. So basically my server never got restarted after the installation, after a quick server reboot, it works fine.

Thanks!