gpt4 book ai didi

ruby-on-rails - Heroku 推送上的 "Could not find bootstrap-sass-2.3.1.1 in any of the sources"

转载 作者:行者123 更新时间:2023-12-04 14:02:26 24 4
gpt4 key购买 nike

我正在尝试部署到 Heroku(rails 3 应用程序)并不断收到此错误:

 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

我查看了许多其他“在任何来源中都找不到 [gem]”的帖子,例如:

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

并尝试了他们提出的所有解决方案,但仍然得到了解决。

我的 gem 文件:
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'

预先感谢您提供的任何支持。

还:

我跑了

bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment

在终端中,因为这是 Heroku 想要运行以查看会发生什么。显然,一旦你运行它,它就会保存你设置的所有选项,所以现在当我运行“dundle install”时,它会使用所有这些选项。知道我如何回滚到默认选项吗?

编辑

第二部分的答案是 rm -rf .bundle && bundle install

编辑 2

这显然与我的特定 gemfile 有关。我用来自 this 的 gemfile 替换了我的 gemfile线程,并部署。

最佳答案

这是 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。

关于ruby-on-rails - Heroku 推送上的 "Could not find bootstrap-sass-2.3.1.1 in any of the sources",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16323273/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com