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 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'
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)
开发者_JAVA百科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?
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.
I think, and I may be wrong, gem 'data_mapper' is like a meta gem. Remove that from list and try
精彩评论