gitlab update error

3275 단어
ǰ��
ͬ��Ϊ�˳���gitlab���¹��ܣ����Ҳ��ڳ�������°��չٷ��ĵ�����������gitlab������˵�����Dz���������ģ���ƫƫ�ͳ������ˡ����������rake db:migrate
����
����μ��ٷ��ĵ�������ֻ������п��ܳ��ֵ��������������
����
��ִ�е�rake db:migrate ʱ�ᱨ�?�����˼��˵��Gemfile��û���ҵ�mysql2����������
#sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production
rake aborted!
Gem::LoadError: Specified 'mysql2' for database adapter, but the gem is not loaded.
 Add `gem 'mysql2'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).

�������
�����ͬʱ����˲'mysql2'ӵ�Gemfile�ļ��С�
��Gemfile�в���mysql2��ʱ�����Ѿ����ڴ���Ŀ������gem install mysql2 Ҳ�ǿ��԰�װ�ģ���˵��Ҫrails �İ4.0
������Ҫע�⣬Gemfile �ļ��Ѿ�����Ҫ���������Լ매우 아름답다д���ˣ�ֱ��ʹ��bundle install�Ϳ��ԣ�����Ӧ���Dz����ڰ매우 아름답다ע�⵽ gem "mysql2", '~> 0.3.16', group: :mysql ��group ��������û�п�������Ϊgroup���������⣬���ǽ�, group: :mysql ע�ͣ���ִ�й�Ȼ�����ˡ�
#sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production

����
������������ֳ��µ����⣬���������ݿ�Ĺ���У����ܸ��µ�һ��͸��²���ȥ�ˣ����������µĴ���
rake db:migrate

== 20140705105820 CreateStructure: migrating ==================================
-- create_table("users")
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

PG::DuplicateTable: ERROR:  relation "users" already exists

rake db:migrate== 20150616125848 AddFieldsToMovies: migrating ================================-- add_column(:movies, :description, :description)
   -> 0.0006s-- add_column(:movies, :release_date, :datetime)
   -> 0.0003s== 20150616125848 AddFieldsToMovies: migrated (0.0009s) =======================

�������
��������һ�����⣬��˵rake db:migrate���ܶ��ִ�У���û���о���ruby ���ܴ��������������������ֵ�ԭ����ܲ�������Ϊrake db:migrate ��ִ���˶�Ρ�
������Ҫע����ǣ���gitlab��һ매우 아름답다ʱ��ǰ��gitlabҲ���봦�ڵ�ǰ전부ǰgitlabΪ8.5.1 ��8.5.x.Ϊ8.5.13 �������Ҫ�Ƚ�gitlab ��8.5.1 �� 8.5.13 ��Ȼ����ܽ�gitlab ��8.5.8.6x�İ매우 아름답다п��ܳ�����������⡣
�ܽ�
gitlab ��Ĺ���к����ܿ매우 아름답다ͬʱ���ʱ��Ҫ��֤gitlab���ڵ�ǰ매우 아름답다С분.״̬��
�ڸ�������ݿ����ͨ����������鿴����״̬
#sudo -u git -H bundle exec rake db:migrate:status RAILS_ENV=production

��ʾΪup ״̬�ı����Ѿ����£����Ϊdown �����δ����
database: gitlabhq_production

 Status   Migration ID    Migration Name
--------------------------------------------------
   up     20121220064453  Init schema
   up     20130102143055  Rename owner to creator for project
   up     20130110172407  Add public to project
   up     20130123114545  Add issues tracker to project
   up     20130125090214  Add user permissions
   up     20130131070232  Remove private flag from project
   up     20130206084024  Add description to namsespace
   up     20130207104426  Add description to teams
   down     20130211085435  Add issues tracker id to project

��ruby ���죬��rake db:migrate ����Ľ�����μ�
http://stackoverflow.com/questions/10301794/difference-between-rake-dbmigrate-dbreset-and-dbschemaload/10302357#10302357
���ij��� ��morrowind�� ���ͣ�����ر����˳���http://morrowind.blog.51cto.com/1181631/1791817

좋은 웹페이지 즐겨찾기