Rails3 couldn't find file 'bootstrap'

后端 未结 1 930
鱼传尺愫
鱼传尺愫 2021-01-16 09:40

This has hit me twice and I cannot get past it this time. The first time, I pushed/pulled from github and got webrick to boot up. This a.m. I attempted to do the same thing.

相关标签:
1条回答
  • 2021-01-16 10:16

    I think you're including too many unrelated details. Sounds like you have /*= require twitter/bootstrap or similar in your application.css.scss manifest and it can't be found. Bootstrap doesn't come with Rails or Sass. You can either drop it manually into your stylesheets directory from the Bootstrap website and require it or you can use one of the gems out there that contains it.

    Since you're using the twitter-bootstrap-rails gem, the documentation says that you install it by running:

    rails generate bootstrap:install
    

    That will probably unpack the bootstrap css files from the gem into your stylesheets directory.

    And your application.css.scss should contain:

    *= require twitter/bootstrap
    
    0 讨论(0)
提交回复
热议问题