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
Shawn Miller
3,688 PointsBuild a simple ruby rails application - simple form
The ruby on rails simple app course uses bootstrap 2.3 for their project. Since I am working this post Bootstrap v3, I decided to use that instead. Wasn't a big deal until the section on customizing your form with simple form. That doesn't support bootstrap v3, so I tried to find a work-around.
I was unable to find a workaround so I decided to go back and use bootstrap v2.3. Even tho i removed the boostrap v3 files (stylesheets & JS), my page is still being styled by boostrap 3. this is really weird, because I can go in and edit the boostrap v2.3 CSS file and break my page, but when I fix it, it still uses bootstrap v3 styles it appears. Plus I am unable to use Simple Form to customize my form, even tho I have installed it correctly and done everything as described by stage 4.
Could anyone offer any insight on this? Thanks!
3 Answers
Shawn Miller
3,688 PointsThank-you for your response! I believe I found the solution! Simple Forms wasn't styling correctly b/c I was using the wrong version of rails. I used the following procedure from another forum thread:
"Michael Sarlitt 1,890 Ok, I figured it out. I had rails 3.2.12 installed instead of 3.2.6 (as shown in the video). Once I updated to 3.2.6, simple_form started working.
For anyone else having this issue:
- Go to the Gemfile in your text editor
- Change gem 'rails', '3.2.12' to gem 'rails', '3.2.6' and save the file
- Go back to Terminal
- Run the command bundle install. You'll get an error.
- Run the command bundle update.
- Restart the rails server (rails s)
And like magic, you'll now see the properly formatted form after refreshing http://localhost:3000/statuses/new.
4 months ago Comment"
Once I did this, Simple Form started styling my forms! :D. Additionally, the bootstrap 3 stylings all went away. I'd tried restarting the server before, so not sure what happened when I did this. Ah well! It looks to be behaving the way it does in the tutorial now. Thanks again!
Stone Preston
42,016 PointsIs bootstrap v3 still in your gemfile? Did you restart your server?
Norman Weitzel
8,047 PointsIf you want to stick with the current versions of rails and bootstrap, I found a bit of a fix and posted it here.
Hope that helps! It was a doozy.