使用 dm-migrations 推送到 Heroku 时出现问题
我找不到其他人有这个错误,所以我希望这不是我的机器或其他特定的问题。
-----> 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
问题是您正在使用此存储库: 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.
我认为,也许我是错的,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