Note that there are some explanatory texts on larger screens.

plurals
  1. POactiveadmin heroku stylesheet config issue with partial fix
    text
    copied!<p>I was receiving the following error message after precompiling my assets locally and then pushing the code to Heroku: </p> <pre><code>2012-03-28T17:06:01+00:00 app[web.1]: Started GET "/admin/login" for 67.163.67.203 at 2012-03-28 17:06:01 +0000 2012-03-28T17:06:01+00:00 app[web.1]: 2012-03-28T17:06:01+00:00 app[web.1]: ActionView::Template::Error (File to import not found or unreadable: active_admin/mixins. 2012-03-28T17:06:01+00:00 app[web.1]: Load paths: 2012-03-28T17:06:01+00:00 app[web.1]: /app 2012-03-28T17:06:01+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activeadmin-0.4.3/app/assets/stylesheets 2012-03-28T17:06:01+00:00 app[web.1]: (in /app/vendor/assets/stylesheets/active_admin.css.scss)): 2012-03-28T17:06:01+00:00 app[web.1]: 7: 2012-03-28T17:06:01+00:00 app[web.1]: 6: &lt;title&gt;&lt;%= [@page_title, active_admin_application.site_title].compact.join(" | ") %&gt;&lt;/title&gt; 2012-03-28T17:06:01+00:00 app[web.1]: 8: &lt;% ActiveAdmin.application.stylesheets.each do |style| %&gt; 2012-03-28T17:06:01+00:00 app[web.1]: 9: &lt;%= stylesheet_link_tag style.path, style.options %&gt; 2012-03-28T17:06:01+00:00 app[web.1]: 10: &lt;% end %&gt; 2012-03-28T17:06:01+00:00 app[web.1]: 11: &lt;% ActiveAdmin.application.javascripts.each do |path| %&gt; 2012-03-28T17:06:01+00:00 app[web.1]: 12: &lt;%= javascript_include_tag path %&gt; 2012-03-28T17:06:01+00:00 app[web.1]: vendor/assets/stylesheets/active_admin.css.scss:2 </code></pre> <p>...</p> <p>I tried a bunch of different options including the following tip that I found here - <a href="http://mrdanadams.com/2011/exclude-active-admin-js-css-rails/" rel="nofollow noreferrer">http://mrdanadams.com/2011/exclude-active-admin-js-css-rails/</a> and others on the GitHub page. </p> <p>None of those options worked. Ultimately, I received some advice to delete my public/assets directory from git, push the code to Heroku and let Heroku precompile the assets. This approach partially worked. I no longer receive the error message when I try to go to the /admin page of my site. However, the active_admin CSS files are missing. It suspects that since Heroku did the precompiling it is not throwing up an error even though the active_admin.css files are not being precompiled. How can I get active_admin.css precompiled?</p> <p>Btw, I am running rails 3.2. </p> <p>EDIT: </p> <p>It appears that my "fix" was not complete. If I have require_tree . or require_directory . in my application.css then it works but it screws up my main apps CSS because they all get compiled to application.css. If I don't have one of those entries then it breaks. Any thoughts on how I can resolve this?</p>
 

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