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

Ruby

Issue in build simple Ruby Application - bootstrap

I seem to be getting quite a bit of different code, which with Ruby 2.0 and Rails 4.0 makes some sense. I am getting some weird CSS issues (assuming because of Bootstrap) but the big one is when i am editing the _form.html.erb file that corresponds to the "Installing Simple Forms" video. My text box is small and out of alignment and the bootstrap submit button does not work either. When i compare out HTML code, it looks different. An example is in the textarea tag the instructor has col: 40 and row :20, where mine just does not have any reference to this. Any help is appreciated as well as what would be best to just override it with a CSS file if possible.

Here is the code for my _form.html.erb:

<%= simple_form_for(@status, html: {class: "form-horizontal"}) do |f| %> <% if @status.errors.any? %> <div id="error_explanation"> <h2><%= pluralize(@status.errors.count, "error") %> prohibited this status from being saved:</h2>

  <ul>
  <% @status.errors.full_messages.each do |msg| %>
    <li><%= msg %></li>
  <% end %>
  </ul>
</div>

<% end %>

<%= f.input :content %>

<div class="form-actions"> <%= f.button :submit %> </div> <% end %>

2 Answers

Jason Seifer
STAFF
Jason Seifer
Treehouse Guest Teacher

There are definite differences between the videos and Rails 4.0. Are you using the latest bootstrap release also? That changed a bunch of class names and selectors which could be another reason it's not displaying.

Yes....it is the latest bootstrap release. I see a number of .json files as well which are not in the videos. I am at the stage where my progress is slow since i can't really follow the videos closely as i am getting too many errors. Is there a quick rule of thumb or generalization for what the .json are replacing in this project? Thanks for the help.

Jason Seifer
STAFF
Jason Seifer
Treehouse Guest Teacher

Can you downgrade both Rails and Bootstrap in order to follow along? There are a ton of changes which can make this really difficult.

Jonathan Seligsohn
Jonathan Seligsohn
23,116 Points

Can you please explain or link to a tutorial explaining how one would downgrade from Rails and Bootstrap, while in the middle of a project? Like Kelly, I'm using latest version of Bootstrap and Ruby 2.0, Rails 4.0.