我正在努力将我的代码推送到Heroku.在谷歌和堆栈溢出问题上搜索之后,我一直无法找到解决方案.以下是我try "git push heroku master"时得到的结果:

Heroku receiving push
-----> Rails app detected
-----> Detected Rails is not set to serve static_assets
       Installing rails3_serve_static_assets... done
-----> Gemfile detected, running Bundler version 1.0.3
       Unresolved dependencies detected; Installing...
       Fetching source index for http://rubygems.org/
       /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:300:in `open_uri_or_path': bad response Not Found 404 (http://rubygems.org/quick/Marshal.4.8/mail-2.2.6.001.gemspec.rz) (Gem::RemoteFetcher::FetchError)
        from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:172:in `fetch_path'
.
....

最后:

FAILED: http://docs.heroku.com/bundler
 !     Heroku push rejected, failed to install gems via Bundler

error: hooks/pre-receive exited with error code 1
To git@heroku.com:myapp.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:myapp.git'

谢谢你的帮助!

推荐答案

我认为这不是Rails版本的问题,也不是特定于Heroku的问题.(我今天遇到了同样的问题,在本地开发机器上用Rails 3.0.3运行bundle install.)

按照安德鲁的建议,在本地运行bundle update次可以解决这个问题.

Edit:

Ruby-on-rails相关问答推荐

Rails 7涡轮框架和多种形式与形式值有关

RSpec系统测试无法从工厂访问新创建的记录

active_storage.resolve_model_to_route的不同值代表什么意思?

Rails 7,Hotwire 动态表单,更新值不起作用

Ruby on Rails/Activerecord 排序自引用查询?

在bash中匹配带有空格字符的字符串

在 Rails 中进行 Http 基本身份验证

使用 Ruby On Rails 的多个用户模型,并设计有单独的注册路由,但只有一个共同的登录路由

Mongoid 3 + Heroku (MongoHQ) 导致 Moped::Errors::OperationFailure

控制器规格与请求规格?

在公共 Rails 应用程序中将敏感数据存储在哪里?

带有 master.key 的 Rails 5.2 - Heroku 部署

Django 还是 Ruby-On-Rails?

如何打印出范围之间的随机数?

获取完整的 rails 控制器名称,包括命名空间

如何强制 RSpec 测试失败?

我是否必须手动卸载所有依赖的 gem?

使用连接的 Ruby on Rails ActiveRecord 查询

ActiveRecord 何时会保存关联?

是否可以输出rake db:migrate产生的 SQL 更改脚本?