redmine 中的电子邮件配置抛出解析错误

email configuration in redmine throwing parsing error

我们是 ruby 的新手,我们正在尝试在我们的服务器上配置 Redmine,但在配置 Redmine 以接收来自 IMAP/pop3 电子邮件服务器的电子邮件时遇到错误。我们正在关注 (http://www.redmine.org/projects/redmine/wiki/RedmineReceivingEmails)

错误是

[root@redmine]# rake -f /app/redmine/Rakefile redmine:email:receive_imap RAILS_ENV="production" host=hostname.com username=bug@hostname.com password=1234567890
(in /app/redmine)

[!] There was an error parsing `Gemfile`: compile error - syntax error, unexpected ':', expecting $end
gem 'tzinfo-data', platforms: [:mingw, :x64_mingw, :mswin]
                             ^. Bundler cannot continue.

 #  from /app/redmine/Gemfile:31
 #  -------------------------------------------
 #  # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
 >  gem 'tzinfo-data', platforms: [:mingw, :x64_mingw, :mswin]
 #  gem "rbpdf", "~> 1.19.3"
 #  -------------------------------------------

版本详情

[root@redmine]# ruby -v
ruby 1.8.7 (2013-06-27 patchlevel 374) [x86_64-linux]
[root@redmine]# bundle -v
Bundler version 1.16.1
[root@redmine]# gem -v
1.3.7.1

您正试图在 Ruby 的 1.8 版本中使用 Ruby 1.9 的哈希语法。您的行应该如下所示:

gem 'tzinfo-data', :platforms => [:mingw, :x64_mingw, :mswin]

(或升级Ruby)