使用 dm-migrations 推送到 Heroku 时出现问题

发布于 2024-10-13 01:54:17 字数 3713 浏览 2 评论 0原文

我找不到其他人有这个错误,所以我希望这不是我的机器或其他特定的问题。

-----> Heroku receiving push
-----> Sinatra app detected

-----> Installing gem data_mapper 1.0.0 from http://rubygems.org
      ERROR:  Error installing data_mapper:
       dm-migrations requires dm-core (~> 1.0.2, runtime)
!     Heroku push rejected, failed to install gem

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

我正在使用捆绑器 1.0.7 来管理我的依赖项。

这是我的 Gemfile:

source :rubygems
gem 'sinatra', '>= 1.0'
gem 'rake'
gem 'rspec', :require => 'spec'
gem 'data_mapper'
gem 'rack-test'
gem 'dm-core'
gem 'dm-sqlite-adapter'
gem 'dm-timestamps'
gem 'dm-validations'
gem 'dm-aggregates'
gem 'dm-migrations'
gem 'haml'

使用 Gemfile.lock (最新)

GEM
  remote: http://rubygems.org/
  specs:
    addressable (2.2.3)
    data_mapper (1.0.2)
      dm-aggregates (= 1.0.2)
      dm-constraints (= 1.0.2)
      dm-core (= 1.0.2)
      dm-migrations (= 1.0.2)
      dm-serializer (= 1.0.2)
      dm-timestamps (= 1.0.2)
      dm-transactions (= 1.0.2)
      dm-types (= 1.0.2)
      dm-validations (= 1.0.2)
    data_objects (0.10.2)
      addressable (~> 2.1)
    diff-lcs (1.1.2)
    dm-aggregates (1.0.2)
      dm-core (~> 1.0.2)
    dm-constraints (1.0.2)
      dm-core (~> 1.0.2)
      dm-migrations (~> 1.0.2)
    dm-core (1.0.2)
      addressable (~> 2.2)
      extlib (~> 0.9.15)
    dm-do-adapter (1.0.2)
      data_objects (~> 0.10.2)
      dm-core (~> 1.0.2)
    dm-migrations (1.0.2)
      dm-core (~> 1.0.2)
    dm-serializer (1.0.2)
      dm-core (~> 1.0.2)
      fastercsv (~> 1.5.3)
      json_pure (~> 1.4)
    dm-sqlite-adapter (1.0.2)
      dm-do-adapter (~> 1.0.2)
      do_sqlite3 (~> 0.10.2)
    dm-timestamps (1.0.2)
      dm-core (~> 1.0.2)
    dm-transactions (1.0.2)
      dm-core (~> 1.0.2)
    dm-types (1.0.2)
      dm-core (~> 1.0.2)
      fastercsv (~> 1.5.3)
      json_pure (~> 1.4)
      stringex (~> 1.1.0)
      uuidtools (~> 2.1.1)
    dm-validations (1.0.2)
      dm-core (~> 1.0.2)
    do_sqlite3 (0.10.2)
      data_objects (= 0.10.2)
    do_sqlite3 (0.10.2-x86-mingw32)
      data_objects (= 0.10.2)
    extlib (0.9.15)
    fastercsv (1.5.4)
    haml (3.0.25)
    json_pure (1.4.6)
    rack (1.2.1)
    rack-test (0.5.7)
      rack (>= 1.0)
    rake (0.8.7)
    rspec (2.4.0)
      rspec-core (~> 2.4.0)
      rspec-expectations (~> 2.4.0)
      rspec-mocks (~> 2.4.0)
    rspec-core (2.4.0)
    rspec-expectations (2.4.0)
      diff-lcs (~> 1.1.2)
    rspec-mocks (2.4.0)
    sinatra (1.1.2)
      rack (~> 1.1)
      tilt (~> 1.2)
    stringex (1.1.0)
    tilt (1.2.2)
    uuidtools (2.1.1)

PLATFORMS
  ruby
  x86-mingw32

DEPENDENCIES
  data_mapper
  dm-aggregates
  dm-core
  dm-migrations
  dm-sqlite-adapter
  dm-timestamps
  dm-validations
  haml
  rack-test
  rake
  rspec
  sinatra (>= 1.0)

在我的实际应用程序中,我的要求按以下顺序排列:

require 'rubygems'
require 'bundler/setup'
require 'dm-core'
require 'dm-validations'
require 'dm-timestamps'
require 'dm-migrations'
require 'dm-types'
require 'haml'
require 'yaml'
require 'json'
require 'ostruct'
require 'sinatra'

是否有任何异常情况会使 Heroku 抛出此错误我?

I couldn't find anyone else having this error, so I hope it's not something specific to my machine or something.

-----> Heroku receiving push
-----> Sinatra app detected

-----> Installing gem data_mapper 1.0.0 from http://rubygems.org
      ERROR:  Error installing data_mapper:
       dm-migrations requires dm-core (~> 1.0.2, runtime)
!     Heroku push rejected, failed to install gem

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

I'm using bundler 1.0.7 to manage my dependencies.

Here is my Gemfile:

source :rubygems
gem 'sinatra', '>= 1.0'
gem 'rake'
gem 'rspec', :require => 'spec'
gem 'data_mapper'
gem 'rack-test'
gem 'dm-core'
gem 'dm-sqlite-adapter'
gem 'dm-timestamps'
gem 'dm-validations'
gem 'dm-aggregates'
gem 'dm-migrations'
gem 'haml'

With Gemfile.lock (up-to-date)

GEM
  remote: http://rubygems.org/
  specs:
    addressable (2.2.3)
    data_mapper (1.0.2)
      dm-aggregates (= 1.0.2)
      dm-constraints (= 1.0.2)
      dm-core (= 1.0.2)
      dm-migrations (= 1.0.2)
      dm-serializer (= 1.0.2)
      dm-timestamps (= 1.0.2)
      dm-transactions (= 1.0.2)
      dm-types (= 1.0.2)
      dm-validations (= 1.0.2)
    data_objects (0.10.2)
      addressable (~> 2.1)
    diff-lcs (1.1.2)
    dm-aggregates (1.0.2)
      dm-core (~> 1.0.2)
    dm-constraints (1.0.2)
      dm-core (~> 1.0.2)
      dm-migrations (~> 1.0.2)
    dm-core (1.0.2)
      addressable (~> 2.2)
      extlib (~> 0.9.15)
    dm-do-adapter (1.0.2)
      data_objects (~> 0.10.2)
      dm-core (~> 1.0.2)
    dm-migrations (1.0.2)
      dm-core (~> 1.0.2)
    dm-serializer (1.0.2)
      dm-core (~> 1.0.2)
      fastercsv (~> 1.5.3)
      json_pure (~> 1.4)
    dm-sqlite-adapter (1.0.2)
      dm-do-adapter (~> 1.0.2)
      do_sqlite3 (~> 0.10.2)
    dm-timestamps (1.0.2)
      dm-core (~> 1.0.2)
    dm-transactions (1.0.2)
      dm-core (~> 1.0.2)
    dm-types (1.0.2)
      dm-core (~> 1.0.2)
      fastercsv (~> 1.5.3)
      json_pure (~> 1.4)
      stringex (~> 1.1.0)
      uuidtools (~> 2.1.1)
    dm-validations (1.0.2)
      dm-core (~> 1.0.2)
    do_sqlite3 (0.10.2)
      data_objects (= 0.10.2)
    do_sqlite3 (0.10.2-x86-mingw32)
      data_objects (= 0.10.2)
    extlib (0.9.15)
    fastercsv (1.5.4)
    haml (3.0.25)
    json_pure (1.4.6)
    rack (1.2.1)
    rack-test (0.5.7)
      rack (>= 1.0)
    rake (0.8.7)
    rspec (2.4.0)
      rspec-core (~> 2.4.0)
      rspec-expectations (~> 2.4.0)
      rspec-mocks (~> 2.4.0)
    rspec-core (2.4.0)
    rspec-expectations (2.4.0)
      diff-lcs (~> 1.1.2)
    rspec-mocks (2.4.0)
    sinatra (1.1.2)
      rack (~> 1.1)
      tilt (~> 1.2)
    stringex (1.1.0)
    tilt (1.2.2)
    uuidtools (2.1.1)

PLATFORMS
  ruby
  x86-mingw32

DEPENDENCIES
  data_mapper
  dm-aggregates
  dm-core
  dm-migrations
  dm-sqlite-adapter
  dm-timestamps
  dm-validations
  haml
  rack-test
  rake
  rspec
  sinatra (>= 1.0)

In my actual application, my requires are in this order:

require 'rubygems'
require 'bundler/setup'
require 'dm-core'
require 'dm-validations'
require 'dm-timestamps'
require 'dm-migrations'
require 'dm-types'
require 'haml'
require 'yaml'
require 'json'
require 'ostruct'
require 'sinatra'

Is there anything out of the ordinary that would have Heroku throw this error at me?

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

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

发布评论

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

评论(2

抱猫软卧 2024-10-20 01:54:17

问题是您正在使用此存储库: https://github.com/zapnap/sinatra-template

除了 Gemfile 之外,它还有一个指定 Datamapper 1.0.0 的 .gems 文件。删除该文件,这应该可以修复它。

The problem is that you are using this repository: https://github.com/zapnap/sinatra-template

In addition to the Gemfile, it has a .gems file which specifies Datamapper 1.0.0. Get rid of that file and this should fix it.

み青杉依旧 2024-10-20 01:54:17

我认为,也许我是错的,gem 'data_mapper' 就像一个元 gem。从列表中删除它并尝试

I think, and I may be wrong, gem 'data_mapper' is like a meta gem. Remove that from list and try

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