Locally, my node.js with express app works as expected. When I push to Heroku, the app is able to load some stylesheets and javascripts, but not others. Here is the relevant snippet from app.js:

app.configure(function(){
  app.set('views', __dirname + '/views');
  app.set('view engine', 'jade');
  app.use(express.bodyParser());
  app.use(express.methodOverride());
  app.use(app.router);
  app.use(express.static(__dirname + '/public'));
});

Here are the assets that I'm loading from my jade templates:

link(href='/stylesheets/style.css', rel='stylesheet')
link(href='/lib/bootstrap/docs/assets/css/bootstrap.css', rel='stylesheet')
link(href='/lib/bootstrap/docs/assets/css/bootstrap-responsive.css', rel='stylesheet')
script(src='/lib/jquery/jquery-1.7.2.js')
script(src='/lib/bootstrap/docs/assets/js/bootstrap-collapse.js')

Everything works locally, but when I push to Heroku, the style.css file and the jquery file are loaded fine. The bootstrap files return a 404.

I'm baffled why this would work locally but would break, and in parts, on Heroku.

share|improve this question
1  
Did you check in your bootstrap files? – Sean Vieira Aug 15 '12 at 2:56
1  
I'm discovering things about git submodules. I copied bootstrap from a git repo and then attempted to removed the .git and .gitconfig from boostrap since I don't care about making it an official submodule. I just wanted the files. The only way I got it to work and be able to commit all of the files was by deleting .git and .gitconfig first, and then copy in the files to the repo. – Miles Aug 15 '12 at 3:12
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.