A few weeks back I bought a theme from wrapbootstrap in order to play around a bit with a new design. This kicked off a fairly and confusing process to get it set up in my Rails 4 app. I couldn’t find any good answers out there, although I found a few people asking similar questions.
I bought the theme called Treble. http://wrapbootstrap.com/preview/WB089478D I don’t know if the process would be different from every theme, but I imagine it might be.
I was getting crazy errors and tried to require different pages in the manifest file (application.js for example). After all that, the simple solution was that the folders needed to live in the vendor/assets directory. Adding them there, stopped the errors, and the page loaded – although this didn’t fix everything. I could get the page to load, and the JS seemed to be working, but the images weren’t loading.
One of the problems that a friend found was that somehow, bootstrap was being called twice. I couldn’t get a full explanation, but the fix is to comment out line 19 which reads <link rel=”stylesheet” href=”assets/style/bootstrap.css” type=”text/css”>. I’m guessing there were some files left over from the install in app/assets and those were getting compiled along with the files in vendor/assets and this was causing issues.
I still had a few more problems which were solved by copying all the folders into the /public folder. Rails seems to pull the bootstrap.css file from the vendor folder and the images from the public folder. So when you need to edit the CSS, do it in the vendor files and when you’re changing the images, do that in the public folder.
Hope this helps at least someone out there.