Note that there are some explanatory texts on larger screens.

plurals
  1. PORails 4 assets still don't precompile in Heroku despite installing the rails_12factor gem
    primarykey
    data
    text
    <p>I recently tried upgrading my Rails 3.2.13 app to the newly released 4.0.0 and tried deploying it to Heroku. Unfortunately, despite following <a href="https://devcenter.heroku.com/articles/rails4" rel="noreferrer">this guide</a>, the assets still don't seem to precompile properly. Of course, I added the <code>rails_12factor</code> gem already and I also did a couple of things to properly upgrade the app to 4.0.0. It works very nicely on development mode and all my tests are still passing. However, it still doesn't display the assets in Heroku.</p> <p>One thing I noticed from running <code>heroku run ls public/assets</code> is that Heroku was actually able to precompile the assets from <code>app/assets</code> and doing a <code>cat</code> command on those files will display the compiled version of the assets. However, if I access the file on the browser, I always get a 404.</p> <p>Is Heroku actually ready for Rails 4?</p> <p><strong>EDIT</strong>:</p> <p>Here's a list of things I did to upgrade from 3.2.13 to 4:</p> <ul> <li><p>Removed asset group as it is no longer used in Rails 4</p></li> <li><p>Update version of rails from <code>3.2.13</code> to <code>4.0.0</code></p></li> <li><p>Remove require line of <code>active_resource/railties</code> from application.rb since active_resource was removed as a dependency from rails</p></li> <li><p>Update sass-rails and coffee-rails to use their corresponding master branches because it is using railties 4.0.0.rc2 instead of 4.0.0 as the dependency</p></li> <li><p>Update version of devise to 3.0.0.rc</p></li> <li><p>Add protected_attributes to ease the transition to Rails 4 without having to switch to strong_parameters yet</p></li> <li><p>Change environment configs to add config.eagerload and remove config.whiny_nils to remove deprecation warnings.</p></li> <li><p>Change syntax of confirm() to remove deprecation warnings</p></li> <li><p>Change hash syntax from hash rockets to the 1.9.3 syntax</p></li> <li><p>Remove auto explain config to remove deprecation warnings</p></li> <li><p>Add bin directory using rake rails:update:bin</p></li> <li><p>Add <code>rails_12factor</code> gem to be able to host to heroku</p></li> <li><p>Add ruby version in Gemfile for heroku</p></li> </ul> <p><strong>EDIT 2</strong></p> <p>I guess it's also worth mentioning that there wasn't any errors in Heroku during the precompilation and it actually says that it was successful in precompiling the assets which is why it's strange that it didn't work.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload