我能夠推到heroku,現在我需要遷移數據庫,但我得到的錯誤耙中止!運行heroku rake db時出現問題:migrate getting rake aborted!錯誤
我跑的命令Heroku的耙分貝:遷移和我的命令行的錯誤是
WARNING: `heroku rake` has been deprecated. Please use `heroku run rake` instead.
Running `rake db:migrate` attached to terminal... up, run.6184
rake aborted!
uninitialized constant MiniTest::Rails
/app/vendor/bundle/ruby/2.0.0/gems/minitest-4.7.5/lib/minitest/unit.rb:19:in `const_missing'
/app/Rakefile:9:in `<top (required)>'
(See full trace by running task with --trace)
所以後來我跑命令
Running `rake db:migrate` attached to terminal... up, run.8495
rake aborted!
uninitialized constant MiniTest::Rails
/app/vendor/bundle/ruby/2.0.0/gems/minitest-4.7.5/lib/minitest/unit.rb:19:in `const_missing'
/app/Rakefile:9:in `<top (required)>'
(See full trace by running task with --trace)
,這裏是我的Rakefile
#!/usr/bin/env rake
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path('../config/application', __FILE__)
require 'rake/dsl_definition'
require 'rake'
Portfolio::Application.load_tasks
MiniTest::Rails::Testing.default_tasks << "features"
副本
這裏也是我的Gemfile的副本
group :development, :test do
gem "minitest-rails"
gem 'sqlite3'
end
group :production do
gem 'pg'
gem 'rails_12factor'
end
group :test do
gem "minitest-rails-capybara"
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'debugger'
任何人都確定我的問題是什麼,爲什麼我無法遷移爲heroku?
謝謝@Ivanoats你的文章工作很好! rb512和jeanaux你幫助與heroku,但它停止了在開發工作,現在它在兩個工程! –
你們,我錯過了開發檢查,趕上ivanoats – rb512
另類:包括最小的鐵軌寶石無處不在。查看寶石創建者@blowmage的評論:https://twitter.com/blowmage/status/387034628734738433 – brookr