0
devise gem을 사용할 때 postgresql을 사용하여 db를 마이그레이션하는 데 rake를 사용할 수 없습니다.Postgresql 및 devise db 마이그레이션 실패
rake db:migrate --trace
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:migrate
** Invoke db:_dump (first_time)
** Execute db:_dump
** Invoke db:schema:dump (first_time)
** Invoke environment
** Invoke db:load_config
** Execute db:schema:dump
rake db:migrate:status
아무것도 반환 :
database: sampleapp_development
Status Migration ID Migration Name
--------------------------------------------------
나는 rails g scaffold <WHATEVER> name email
을하고 난 갈퀴 DB를 실행하면 모든 잘 작동하지만, 유증 ... 아무것도를 마이그레이션 할 수 있습니다.
gemfile :
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.1'
# Use postgresql as the database for Active Record
gem 'pg'
# Use SCSS for stylesheets
gem 'bootstrap-generators', '~> 3.1.1'
gem 'sass-rails', '~> 4.0.3'
gem 'bootstrap-sass', '~> 3.1.1'
gem 'simple_form'
gem 'rails_12factor', group: :production
gem 'devise'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/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
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring', group: :development
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
devise 마이그레이션 파일이 생성 된 것을 볼 수 있습니까? –
@nidhi 예, 그렇습니다. 모든 마이그레이션 파일을 볼 수 있습니다. '20140621182346_devise_create_users' – fyz
이상한 일입니다. 혹시라도 데이터베이스를 삭제하고 모든 이전을 다시 시도 할 수 있습니까? –