我找不到其他人有这个错误,所以我希望这不是我的机器特有的东西。
-----> 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 git@heroku.com:episodes.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:episodes.git'
我正在使用bundler 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会把这个错误抛给我?
答案 0 :(得分:3)
问题是您正在使用此存储库:https://github.com/zapnap/sinatra-template
除了Gemfile之外,它还有一个指定Datamapper 1.0.0的.gems文件。摆脱该文件,这应该解决它。
答案 1 :(得分:0)
我想,我可能错了,gem'data_mapper'就像是一个元宝石。从列表中删除并尝试