redmine安装Redmine Banner插件
环境 Ubuntu 14.04,Redmine 3.2
按照插件提示安装,解压缩源代码到redmine plugins目录,然后执行 bundle exec rake redmine:plugins:migrate。结果报错
rake aborted!
SyntaxError: /home/redmine/redmine/plugins/redmine_banner-0.3.4/init.rb:39: syntax error, unexpected ':', expecting =>
..._banner', action: 'show', "id": nil }, caption: :banner
... ^
/home/redmine/redmine/plugins/redmine_banner-0.3.4/init.rb:40: syntax error, unexpected ':', expecting =>
..._banner', action: 'show', "id": nil }, caption: :banner,
... ^
/home/redmine/redmine/plugins/redmine_banner-0.3.4/init.rb:41: Can't assign to true
/home/redmine/redmine/plugins/redmine_banner-0.3.4/init.rb:43: syntax error, unexpected ':', expecting =>
...'banner', action: 'show', "id": nil },
应该是ruby版本太旧了,解析不了ruby hash的新语法。查看代码 redmine_banner/init.rb ,发现最新版本要求redmine 4.0了。redmine因为在用,不敢随便升级,换个思路,安装降级的Redmine Banner插件。装了个v0.1.2的版本,安装插件时依然报错
root@036f62bcd3a2:/home/redmine/redmine/plugins# bundle exec rake redmine:plugins:migrate
Could not find gem 'simplecov-rcov (>= 0) ruby' in any of the gem sources listed in your Gemfile or available on this machine.
Run `bundle install` to install missing gems.
是缺了组件了,需要安装。直接运行bundle install安装非常慢,于是更换国内源
bundle config mirror.https://rubygems.org https://mirrors.tuna.tsinghua.edu.cn/rubygems/
还是报错
Could not verify the SSL certificate for https://index.ruby-china.com/quick/Marshal.4.8/simplecov-rcov-0.1.0.gemspec.rz.
There is a chance you are experiencing a man-in-the-middle attack, but most likely your system doesn't have the CA certificates needed for verification. For information about OpenSSL certificates, see bit.ly/ruby-ssl. To connect without
using SSL, edit your Gemfile sources and change 'https' to 'http'.
找到的解决方案是更新本地ca证书
apt-get install ca-certificates
然后 bundle install 成功了