投稿

8月, 2013の投稿を表示しています

rake redmine:plugins:migrate RAILS_ENV=production を行うと Duplicate Error Column Name などのエラーが起こる

症状        rake redmine:plugins:migrate RAILS_ENV=production       を実行すると、すでに存在するテーブル、あるいはすでに存在するカラムをaddしようとしてい       る旨のエラーがでる。 原因 DB移行作業時に'schema_migrations'の移行がされていなかったため、現行データベースの状況にあった適切なMigrationが実行できない。 対処 yaml_db のソースコードを修正する: vi ./.rvm/gems/ruby-1.9.3-p286/gems/yaml_db-0.2.3/lib/serialization_helper.rb 161行目ぐらいにある ActiveRecord::Base.connection.tables.reject { |table| ['schema_info', 'schema_migrations'].include?(table) } を ActiveRecord::Base.connection.tables.reject { |table| ['schema_info'].include?(table) }        とする。

rake db:migrate RAILS_ENV=production にて uninitialized constant Backlogs::IssueQueryPatch::RbRelease のエラーが出る

症状 rake db:migrate RAILS_ENV=production (in /home/redmine/redmine-2.3.1) rake aborted! uninitialized constant Backlogs::IssueQueryPatch::RbRelease /home/redmine/redmine-2.3.1/plugins/redmine_backlogs-1.0.5/lib/backlogs_issue_query_patch.rb:31:in `block in included' /home/redmine/redmine-2.3.1/plugins/redmine_backlogs-1.0.5/lib/backlogs_issue_query_patch.rb:25:in `class_eval' /home/redmine/redmine-2.3.1/plugins/redmine_backlogs-1.0.5/lib/backlogs_issue_query_patch.rb:25:in `included' /home/redmine/redmine-2.3.1/plugins/redmine_backlogs-1.0.5/lib/backlogs_issue_query_patch.rb:145:in `include' /home/redmine/redmine-2.3.1/plugins/redmine_backlogs-1.0.5/lib/backlogs_issue_query_patch.rb:145:in `<top (required)>' /home/redmine/redmine-2.3.1/plugins/redmine_backlogs-1.0.5/init.rb:27:in `block in <top (required)>' /home/redmine/.rvm/gems/ruby-1.9.3-p286/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:440:in `_run__227089559__prepare__360480817...

rake db:dump で invalid byte sequence in UTF-8 エラーが出る

症状 rake db:dump RAILS_ENV=production --trace ** Invoke db:dump (first_time) ** Invoke db:schema:dump (first_time) ** Invoke environment (first_time) ** Execute environment ** Invoke db:load_config (first_time) ** Execute db:load_config ** Execute db:schema:dump ** Invoke db:data:dump (first_time) ** Invoke environment ** Execute db:data:dump invalid byte sequence in UTF-8 /home/redmine/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/psych/visitors/yaml_tree.rb:225:in `count' /home/redmine/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/psych/visitors/yaml_tree.rb:225:in `binary?' /home/redmine/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/psych/visitors/yaml_tree.rb:234:in `visit_String' /home/redmine/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/psych/visitors/yaml_tree.rb:103:in `accept' /home/redmine/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/psych/visitors/yaml_tree.rb:313:in `block in visit_Array' /home/redmine/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/psych/visitors/yam...

gem install nokogiri -v '1.5.10' にて Errorが起きる

症状 gem install nokogiri -v '1.5.10' Building native extensions.  This could take a while... ERROR:  Error installing nokogiri:         ERROR: Failed to build gem native extension.         /home/redmine/.rvm/rubies/ruby-1.9.3-p448/bin/ruby extconf.rb checking for libxml/parser.h... no ----- libxml2 is missing.  please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies. ----- *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers.  Check the mkmf.log file for more details.  You may need configuration options. Provided configuration options:         --with-opt-dir         --without-opt-dir         --with-opt-include         --without-opt-inc...