How I fixed a precompiling issue in rails

I had my first Waza in the office yesterday and I got to work with the brilliant Skim, who helped me solved aproblem in one of my future open source projects(which is still in development stage). The problem was a pesky dependency issue when precompiling assets, it would bomb.

At first I thought this was related to heroku and how it handles files, but it wasn’t that.
We thought the first step in troubleshoot is to make sure we were on the latest version of bootstrap and sass, as that is where the stack trace indicating.

Screen Shot 2016-02-07 at 12.11.42.jpgSadly the issue persisted, we needed to delve deeper.

We decided to remove the references bootstrap library within the stylesheets, as the bootstrap dependency ideally should be loading via the asset pipeline. This meant also removing references from the ‘application.rb’, ‘application.html.rb’ files.

Screen Shot 2016-02-07 at 12.59.53.jpg

Screen Shot 2016-02-07 at 13.00.28.jpg

Screen Shot 2016-02-07 at 13.00.54.jpg

The final step was to explicitly state which assets to precompile in the “config/initializers/assets.rb” file.

Screen Shot 2016-02-07 at 13.01.30.jpg

Which worked!!!

When it worked I had to high five Skim. Because of this issue I had put this  side project on the back burner and now I can go back to implementing new features

Learnt a lot from this session, about rails, about pairing and how to approach problems like this.


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s