Heroku Rails 无法通过 Bundler 安装 gem - 没有指定来源

发布于 2024-12-10 06:12:50 字数 3164 浏览 0 评论 0原文

当我尝试提交 Heroku 时遇到一些奇怪的错误...... 我的 gemfile:

source 'http://rubygems.org'
gem 'rails', '3.1.0'
group :assets do
gem 'coffee-rails', "~> 3.1.0"
gem 'uglifier'
end

gem "jquery-rails"
gem "rspec-rails", ">= 2.6.1", :group => [:development, :test]
gem "database_cleaner", ">= 0.6.7", :group => :test
gem "mongoid-rspec", ">= 1.4.4", :group => :test
gem "factory_girl_rails", ">= 1.1.0", :group => :test
gem "cucumber-rails", ">= 1.0.2", :group => :test
gem "capybara", ">= 1.0.1", :group => :test
gem "launchy", ">= 2.0.5", :group => :test
gem "bson_ext", ">= 1.3.1"
gem "mongoid", ">= 2.2.0"
gem "paperclip"
gem "mongoid-paperclip", :require => "mongoid_paperclip" 
gem "devise", ">= 1.4.4"
gem "uuidtools"
gem "rqrcode"
gem "dynamic_form"
gem 'aws-s3', :require => 'aws/s3'
gem 'right_aws', :require => 'right_aws'
gem 'sass-rails', "~> 3.1.0"
gem 'compass', :git => 'git://github.com/chriseppstein/compass.git'
gem 'html5-boilerplate', :git => 'git://github.com/sporkd/compass-html5-boilerplate.git'

我的错误

Counting objects: 86, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (55/55), done.
Writing objects: 100% (57/57), 9.76 KiB, done.
Total 57 (delta 37), reused 0 (delta 0)

-----> Heroku receiving push
-----> Removing .DS_Store files
-----> Ruby/Rails app detected
-----> Installing dependencies using Bundler version 1.1.rc
    Running: bundle install --without development:test --path vendor/bundle
    You are trying to install in deployment mode after changing
    your Gemfile. Run `bundle install` elsewhere and add the
    updated Gemfile.lock to version control.
    If this is a development machine, remove the Gemfile freeze
    by running `bundle install --no-deployment`.
    You have added to the Gemfile:
    * source: git://github.com/sporkd/compass-html5-boilerplate.git (at maste
r)
    * source: git://github.com/chriseppstein/compass.git (at master)
    * source: rubygems repository http://rubygems.org/
    * rails (= 3.1.0)
    * coffee-rails (~> 3.1.0)
    * uglifier
    * jquery-rails
    * rspec-rails (>= 2.6.1)
    * database_cleaner (>= 0.6.7)
    * mongoid-rspec (>= 1.4.4)
    * factory_girl_rails (>= 1.1.0)
    * cucumber-rails (>= 1.0.2)
    * capybara (>= 1.0.1)
    * launchy (>= 2.0.5)
    * bson_ext (>= 1.3.1)
    * mongoid (>= 2.2.0)
    * paperclip
    * mongoid-paperclip
    * devise (>= 1.4.4)
    * uuidtools
    * rqrcode
    * dynamic_form
    * aws-s3
    * right_aws
    * sass-rails (~> 3.1.0)
    * compass
    * html5-boilerplate
    You have changed in the Gemfile:
    * compass from `git://github.com/chriseppstein/compass.git (at master)` t
o `no specified source`
    * html5-boilerplate from `git://github.com/sporkd/compass-html5-boilerpla
te.git (at master)` to `no specified source`

!
!     Failed to install gems via Bundler.
!

我已经 git rm Gemfile.lock 然后捆绑安装, git add 。 , git commit -m "heroku please work" 然后 git Push。但没有骰子。我也尝试过更新捆绑程序(Windows 上的捆绑版本 1.0.21)

有什么想法吗?谢谢

I'm getting some strange errors when trying to commit to Heroku...
My gemfile:

source 'http://rubygems.org'
gem 'rails', '3.1.0'
group :assets do
gem 'coffee-rails', "~> 3.1.0"
gem 'uglifier'
end

gem "jquery-rails"
gem "rspec-rails", ">= 2.6.1", :group => [:development, :test]
gem "database_cleaner", ">= 0.6.7", :group => :test
gem "mongoid-rspec", ">= 1.4.4", :group => :test
gem "factory_girl_rails", ">= 1.1.0", :group => :test
gem "cucumber-rails", ">= 1.0.2", :group => :test
gem "capybara", ">= 1.0.1", :group => :test
gem "launchy", ">= 2.0.5", :group => :test
gem "bson_ext", ">= 1.3.1"
gem "mongoid", ">= 2.2.0"
gem "paperclip"
gem "mongoid-paperclip", :require => "mongoid_paperclip" 
gem "devise", ">= 1.4.4"
gem "uuidtools"
gem "rqrcode"
gem "dynamic_form"
gem 'aws-s3', :require => 'aws/s3'
gem 'right_aws', :require => 'right_aws'
gem 'sass-rails', "~> 3.1.0"
gem 'compass', :git => 'git://github.com/chriseppstein/compass.git'
gem 'html5-boilerplate', :git => 'git://github.com/sporkd/compass-html5-boilerplate.git'

My errors

Counting objects: 86, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (55/55), done.
Writing objects: 100% (57/57), 9.76 KiB, done.
Total 57 (delta 37), reused 0 (delta 0)

-----> Heroku receiving push
-----> Removing .DS_Store files
-----> Ruby/Rails app detected
-----> Installing dependencies using Bundler version 1.1.rc
    Running: bundle install --without development:test --path vendor/bundle
    You are trying to install in deployment mode after changing
    your Gemfile. Run `bundle install` elsewhere and add the
    updated Gemfile.lock to version control.
    If this is a development machine, remove the Gemfile freeze
    by running `bundle install --no-deployment`.
    You have added to the Gemfile:
    * source: git://github.com/sporkd/compass-html5-boilerplate.git (at maste
r)
    * source: git://github.com/chriseppstein/compass.git (at master)
    * source: rubygems repository http://rubygems.org/
    * rails (= 3.1.0)
    * coffee-rails (~> 3.1.0)
    * uglifier
    * jquery-rails
    * rspec-rails (>= 2.6.1)
    * database_cleaner (>= 0.6.7)
    * mongoid-rspec (>= 1.4.4)
    * factory_girl_rails (>= 1.1.0)
    * cucumber-rails (>= 1.0.2)
    * capybara (>= 1.0.1)
    * launchy (>= 2.0.5)
    * bson_ext (>= 1.3.1)
    * mongoid (>= 2.2.0)
    * paperclip
    * mongoid-paperclip
    * devise (>= 1.4.4)
    * uuidtools
    * rqrcode
    * dynamic_form
    * aws-s3
    * right_aws
    * sass-rails (~> 3.1.0)
    * compass
    * html5-boilerplate
    You have changed in the Gemfile:
    * compass from `git://github.com/chriseppstein/compass.git (at master)` t
o `no specified source`
    * html5-boilerplate from `git://github.com/sporkd/compass-html5-boilerpla
te.git (at master)` to `no specified source`

!
!     Failed to install gems via Bundler.
!

Stuff I've git rm Gemfile.lock then bundle install, git add . , git commit -m "heroku please work" and then git push. But no dice. I've also tried updating bundler (bundle version 1.0.21 on windows)

Any ideas? Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

江城子 2024-12-17 06:12:51

我有同样的问题。需要运行 git add 。并在捆绑安装后 git commit

I had the same issue. Need to run git add . and git commit after bundle install

庆幸我还是我 2024-12-17 06:12:51

我遇到了同样的问题,在过去几天研究和尝试了不同的建议解决方案之后,我发现这篇文章帮助我解决了这个问题:

Heroku 拒绝成熟应用程序中的推送(预接收挂钩被拒绝)

Codeglot 在其答案下的评论中提供了步骤这可能对你有帮助。

我能够通过运行 gem update heroku 解决我的问题。然后我删除了旧版本的heroku gem(gem uninstall heroku -v 2.8.6)。您可以输入gem list来查看是否安装了heroku gem的多个版本。然后,当我重新运行bundle install并重新推送到heroku时,它起作用了。

如果这对您不起作用,Codeglot 提供了对您的应用程序进行攻击并重新开始的步骤,这似乎对该帖子中提出问题的人有效。

I had the same issue and after researching and experimenting with different suggested solutions for the past few days, I came across this post that helped me resolve it:

Heroku rejecting push in mature application (pre-receive hook declined)

Codeglot offers steps in the comments under his answer that may help you.

I was able to resolve my issue by running gem update heroku. I then removed the older version of the heroku gem (gem uninstall heroku -v 2.8.6). You can type gem list to see if you have multiple versions of the heroku gem installed. When I then reran bundle install and re-pushed to heroku, it worked.

If that doesn't work for you, Codeglot provides the steps to nuke your app and start over, which seems to have worked for the person asking the question in that post.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文