【发布时间】:2018-06-29 22:28:32
【问题描述】:
我正在尝试将我的应用程序部署到 heroku。一切正常,直到我尝试运行“heroku run rake db:migrate”。然后我收到以下错误(请在新选项卡中打开此图像以更好地查看:
我在本地运行了 rake db:drop、rake db:create 和 rake db:migrate。然后我把它推到heroku并尝试再次运行“heroku run rake db:migrate”,但同样的错误。我知道这与已经有用户表的架构有关,但我没有在我的文件中看到它。
宝石文件:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.6'
# Use sqlite3 as the database for Active Record
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
# for users
gem 'devise', '~> 4.2'
# Use ActiveModel has_secure_password
gem 'bcrypt', git: 'https://github.com/codahale/bcrypt-ruby.git', :require => 'bcrypt'
# Use Unicorn as the app server
# gem 'unicorn'
gem 'tzinfo-data'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug'
end
group :test do
# for seeing test covarage
gem 'simplecov', :require => false
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'sqlite3'
end
# upload files
gem 'carrierwave', '~> 1.0'
# bootstraps
gem 'bootstrap-sass', '~> 3.3.4.1'
# Material Icons
gem 'material_icons'
# Material css
gem 'materialize-sass'
group :production do
gem 'pg', '0.15'
gem 'rails_12factor'
end
我还有其他事情要做还是我错过了什么?
【问题讨论】:
标签: ruby-on-rails heroku