1. 更改默认gem源,解决bundle install安装缓慢或失败的问题
D:\Bitnami\redmine-4.1.1-1>gem source -l
*** CURRENT SOURCES ***
https://rubygems.org/
D:\Bitnami\redmine-4.1.1-1>gem sources --remove https://rubygems.org/
https://rubygems.org/ removed from sources
D:\Bitnami\redmine-4.1.1-1>gem source -a https://gems.ruby-china.com
https://gems.ruby-china.com added to sources
D:\Bitnami\redmine-4.1.1-1>gem source -l
*** CURRENT SOURCES ***
https://gems.ruby-china.com
D:\Bitnami\redmine-4.1.1-1\apps\redmine\htdocs>gem source -l
*** CURRENT SOURCES ***
https://gems.ruby-china.com
D:\Bitnami\redmine-4.1.1-1\apps\redmine\htdocs>bundle config mirror.https://rubygems.org https://gems.ruby-china.com
D:\Bitnami\redmine-4.1.1-1\apps\redmine\htdocs>bundle install
Fetching gem metadata from https://gems.ruby-china.com/............
Fetching gem metadata from https://gems.ruby-china.com/..
2. 文件名错误报错信息
D:\Bitnami\redmine-4.1.1-1\apps\redmine\htdocs>bundle exec rake redmine:plugins:migrate RAILS_ENV=production
rake aborted!
Redmine::PluginNotFound: Plugin not found. The directory for plugin view_customize should be D:/Bitnami/redmine-4.1.1-1/apps/redmine/htdocs/plugins/view_customize.
D:/Bitnami/redmine-4.1.1-1/apps/redmine/htdocs/lib/redmine/plugin.rb:102:in `register'
D:/Bitnami/redmine-4.1.1-1/apps/redmine/htdocs/plugins/redmine-view-customize/init.rb:1:in `<top (required)>'
D:/Bitnami/redmine-4.1.1-1/apps/redmine/htdocs/lib/redmine/plugin.rb:181:in `block in load'
这里给出了这个插件应该在的文件夹,即…/plugins/view_customize,把该插件文件名更改为view_customize即可。
D:\Bitnami\redmine-4.1.1-1\apps\redmine\htdocs>bundle exec rake redmine:plugins:migrate RAILS_ENV=production
== 1 CreateViewCustomizes: migrating ==========================================
-- create_table(:view_customizes, {:options=>"ENGINE=InnoDB", :id=>:integer})
-> 0.2722s
== 1 CreateViewCustomizes: migrated (0.2738s) =================================
== 2 AddColumnViewCustomizes: migrating =======================================