2012-08-08 109 views
2

我在尝试将我的Redmine安装升级到最新版本。 我根据需要更新了ruby,rails和gem。在Windows上安装Redmine的RMagick错误

current trunk | ruby 1.8.7, 1.9.2, 1.9.3, jruby-1.6.7 | Rails 3.2.6 | RubyGems <= 1.8 

印发rake db:migrate命令它给了我下面的错误:

C:\ruby-apps\RedMine>rake db:migrate RAILS_ENV=production
←[31mCould not find gem 'rmagick (>= 2.0.0) x86-mingw32' in the gems available on this machine.←[0m
←[33mRun bundle install to install missing gems.←[0m

所以我安装rmagick针对Win32和列出已安装宝石我看到:

...
railties (3.2.6)
rake (0.9.2.2)
rdoc (3.12)
rmagick (2.12.0 mswin32)
ruby-openid (2.1.8)
rubygems-update (1.8.24)
...

rake db:migrate仍然给我同样的错误,所以我试过bundle install,但我得到:

Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.

C:/Ruby193/bin/ruby.exe extconf.rb 

checking for Ruby version >= 1.8.5... yes
checking for stdint.h... * 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.

任何想法如何摆脱这个?

回答

1

其实Bitnami's Redmine windows Installer包含了解决这个问题。
使用它,对我来说是一个有效的解决方案。

安装内容可用于检查正确的版本和依赖关系,以正确构建Redmine。

2

我在安装redmine时遇到了同样的问题。根据Gemfile rmagick可选中的注释,仅用于将Gant图导出为PNG。所以,如果你不需要这个特定的功能,您可以运行

bundle install --without development test rmagick