我正在尝试部署到Heroku(rails 3 app)并继续收到此错误:
Checking in `vendor/bundle` is not supported. Please remove this directory
and add it to your .gitignore. To vendor your gems with Bundler, use
`bundle pack` instead.
-----> Installing dependencies using Bundler version 1.3.2
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
Fetching gem metadata from https://rubygems.org/........
Fetching gem metadata from https://rubygems.org/..
Could not find bootstrap-sass-2.3.1.1 in any of the sources
!
! Failed to install gems via Bundler.
!
! Heroku push rejected, failed to compile Ruby/rails app
我看了很多其他“找不到任何来源的宝石”帖子,如:
Heroku- Could not find paperclip-3.1.3 in any of the sources Heroku: Could not find libv8-3.15.11.1 in any of the sources Could not find multi_json-1.7.2 in any of the sources
并尝试了他们提出的所有解决方案,我仍然得到了这个。
我的宝石文件:
source 'https://rubygems.org'
gem 'rails', '~> 3.2.11'
group :production, :staging do
gem 'pg'
end
group :development, :test do
gem 'sqlite3'
gem "better_errors"
gem 'rails-footnotes', '>= 3.7.5.rc4'
end
group :assets do
gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
gem "less-rails"
gem 'sass-rails', '~> 3.2'
gem "twitter-bootstrap-rails"
gem 'jquery-rails'
gem 'omniauth'
gem 'omniauth-twitter'
gem "paperclip", "~> 3.0"
gem 'thin'
gem 'rails_admin'
gem 'devise'
gem 'binding_of_caller'
gem 'twilio-ruby'
gem 'aws-sdk'
gem 'aws-s3'
gem 'twitter'
提前感谢您提供的任何支持。
此外:
我跑了
捆绑安装 - 没有开发:test --path vendor / bundle --binstubs vendor / bundle / bin --deployment
终端中的因为这是Heroku想要运行的内容,看看会发生什么。显然,一旦你运行它,它就会保存你设置的所有选项,所以现在当我运行“dundle install”时,它会使用所有这些选项。知道我如何回滚到默认选项吗?
修改
第二部分的答案是rm -rf .bundle&&捆绑安装
编辑2
这显然与我的特定gemfile有关。我用this线程替换了我的gemfile,并将其部署。
答案 0 :(得分:9)
这是bootstrap-sass gem本身的一个错误。
https://github.com/thomas-mcdonald/bootstrap-sass/commit/abf20dae81b894fc5e03aaa006887265254277d1
我设置了以下内容:
gem "bootstrap-sass", "2.3.1.0"
然后跑了
gem uninstall bootstrap-sass
bundle update bootstrap-sass
bundle install
并且能够再次推向heroku。
答案 1 :(得分:1)
您是否尝试在gem文件中明确要求bootstrap-sass?
gem "bootstrap-sass", "2.3.1.1"
答案 2 :(得分:0)
我有同样的问题。这是因为bootstrap-sass gem在资产组中。
我从资产组中删除了它,它在Heroku中运行良好