Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7163023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:49:53+00:00 2026-05-28T13:49:53+00:00

Wanted to try something new, using the awesome twitter bootstrap and their Less CSS

  • 0

Wanted to try something new, using the awesome twitter bootstrap and their Less CSS. I finally got my app up and running, but it crashed at heroku’s read-only system.
I’m trying to figure out my options, using LESS, rails 3.2 and heroku. This is what I think can do:

(1) One option is: precompile.

 bundle exec rake assets:precompile
 git commit public/assets -m "tedious precompilation task"
 git push heroku

I’ll surely forget to precompile once, just push the changes to heroku and piss off my users. Not what I want.

(2) A good option is less.js. It compiles client-side. Is this what most use?

(3) A better option, IMO. Precompile to cache. Neither a precompile routine nor extra client side work. What I’m asking, is there something like hassle for SASS, for less?

UPDATE 26th jan-12: people don’t use hassle rails 3.1+, they use sass-rails (default rails 3.2) with the asset pipeline. hassle is sooo rails 3.0 😉 The rake precompile step failed at heroku. /UPDATE

I find the idea of compiling to static rack cache to be served by varnish absolutely brilliant. I’d prefer it over having every client needing to compile my less css themselves when it can be done one time, at deploy.

UPDATE 25th jan: Updating myself on heroku. The cedar stack supports the asset pipeline, so there is no need for the hassle gem anymore. Correct? /UPDATE

What to do?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T13:49:54+00:00Added an answer on May 28, 2026 at 1:49 pm

    Solution:

    application.rb
      config.assets.initialize_on_precompile = false
    

    Simple solution, once you know it …. !

    Use with gem less-rails
    Now all assets are compiled and will be cached, (as in option 3). The asset pipeline is awesome!

    Problem background:

    Heroku couldn’t precompile as rails pr default tries to initialize and attach to DB, but the ENV vars ain’t available yet. Without it you’d get

    $ git push heroku
    
    Preparing app for Rails asset pipeline
    Running: rake assets:precompile
    rake aborted!
    could not connect to server: Connection refused
    Is the server running on host "127.0.0.1" and accepting
    TCP/IP connections on port 5432?
    

    Just as a note: Heroku has a way of providing the environment variables at precompile stage too.

    $ heroku plugins:install http://github.com/heroku/heroku-labs.git
    $ heroku labs:enable user_env_compile  [--app my_app]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on some scraping app, i wanted to try to get it
I'm new to android development and as a pet project I wanted to try
Here is the latest code. I wanted to try something different but I am
I wanted to try a little design by contract in my latest C# application
I have wanted to try GAE since launch, but coming from ASP .NET and
so I wanted to try my first CLR project in Visual C++. So I
After I've seen this PDC session I wanted to try to learn a bit
Inspired by this question , I wanted to try my hand at the latest
I have a quick little application and wanted to give a try to develop
I wanted to make some simple file recovery software, where I want to try

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.