【问题标题】:email configuration in redmine throwing parsing errorredmine 中的电子邮件配置引发解析错误
【发布时间】:2018-05-09 12:20:22
【问题描述】:

我们是 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.x 吗?
  • [root@redmine]# ruby​​ -v ruby​​ 1.8.7 (2013-06-27 patchlevel 374) [x86_64-linux]
  • Redmine不能在这么旧的版本上运行,至少升级到2.2。

标签: ruby-on-rails ruby rubygems redmine


【解决方案1】:

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

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

(或升级 Ruby)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-05-24
    • 2018-07-07
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多