0

Redmine 2.1.4 をインストールしようとしているために必要な、Windows での gem のインストールに問題がありjsonます。rmagick

すぐに使える手順はなく、自分で数時間苦労したので、ここで助けを求めようと思いました.

4

1 に答える 1

4

I'm assuming you don't have Ruby installed yet. If you do, as any of other components mentioned below, probably it's the wisest to uninstall them before proceeding with installation.

This tutorial should help you avoid problems with json and rmagick gems on Windows.

  1. First, download Redmine 2.1.4 from rubyforge as zip or from SVN or Git as described on the relevant Redmine Wiki page. rubyforge tends not to work, so you can be forced to use the latter.

  2. Download RubyInstaller (1.9.3 at the time of this writing) and DevelopmentKit from rubyinstaller.org

  3. Install Ruby using the downloaded installer. Use a directory without spaces in name, i.e. don't install it to Program Files. I checked the options as below enter image description here

  4. Open command line, check if Ruby path has been added to your system. ruby --version should show the version installed, 1.9.3 in my case. If you had command line opened while installing Ruby, close and reopen it to load path.

  5. Extract DevKit to a path with no spaces. Change to DevKit's directory (might be e.g. under Ruby's installation, i.e. C:\Ruby193\DevKit). Execute the following:

    ruby dk.rb init

    ruby dk.rb review (should detect Ruby's installation path correctly)

    ruby dk.rb install

  6. Install bundler gem gem install bundler

  7. Go to Redmine home directory. Execute bundle install. You will probably (if not yet fixed) get the rmagick error - don't worry yet.

  8. Go get ImageMagick. I picked ImageMagick-6.8.0-7-Q16-windows-dll.exe. Install to a directory whose path doesn't include spaces, e.g. C:\ImageMagick. Choose to install header files as well, as below: enter image description here

  9. Add ImageMagick home to path. Close command line and reopen it. This will reload path.

  10. Execute `gem install rmagick --platform=ruby -- --with-opt-lib=c:/ImageMagick/lib --with-opt-include=c:/ImageMagick/include

  11. Go to Redmine home directory again. Execute bundle install again. Should work now.

Hope that helps!

于 2012-11-28T09:43:30.380 に答える