Windows 上的 rmagick 问题

发布于 2024-11-27 12:40:40 字数 1385 浏览 3 评论 0原文

我正在尝试在 Windows 上为 Rails 应用程序安装 rmagick。

我已下载以下文件并按照说明进行操作:
http://rubyforge .org/frs/download.php/64917/RMagick-2.12.0-ImageMagick-6.5.6-8-Q8.zip

如果我运行 irb 并需要 'rubygems';需要“RMagick”,就可以了。
但是,如果我在 Rails 控制台中 require 'RMagick' ,它会给出以下错误:

irb(main):001:0> require 'RMagick'
LoadError: no such file to load -- RMagick
        from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/activesupport-3.
0.4/lib/active_support/dependencies.rb:239:in `require'
        from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/activesupport-3.
0.4/lib/active_support/dependencies.rb:239:in `require'
        from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/activesupport-3.
0.4/lib/active_support/dependencies.rb:225:in `load_dependency'
        from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/activesupport-3.
0.4/lib/active_support/dependencies.rb:596:in `new_constants_in'
        from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/activesupport-3.
0.4/lib/active_support/dependencies.rb:225:in `load_dependency'
        from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/activesupport-3.
0.4/lib/active_support/dependencies.rb:239:in `require'
        from (irb):1

这是为什么?

I am trying to install rmagick on Windows for a rails app.

I've downloaded the following file and followed the instructions:
http://rubyforge.org/frs/download.php/64917/RMagick-2.12.0-ImageMagick-6.5.6-8-Q8.zip

If I run irb and require 'rubygems'; require 'RMagick', it's ok.
But if I require 'RMagick' in rails console, it gives me the following error:

irb(main):001:0> require 'RMagick'
LoadError: no such file to load -- RMagick
        from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/activesupport-3.
0.4/lib/active_support/dependencies.rb:239:in `require'
        from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/activesupport-3.
0.4/lib/active_support/dependencies.rb:239:in `require'
        from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/activesupport-3.
0.4/lib/active_support/dependencies.rb:225:in `load_dependency'
        from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/activesupport-3.
0.4/lib/active_support/dependencies.rb:596:in `new_constants_in'
        from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/activesupport-3.
0.4/lib/active_support/dependencies.rb:225:in `load_dependency'
        from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/activesupport-3.
0.4/lib/active_support/dependencies.rb:239:in `require'
        from (irb):1

Why is that?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

又爬满兰若 2024-12-04 12:40:40

先决条件:
红宝石> 1.8.6
DevKit(任何版本)
没有其他 ImageMagick 安装或 PATH 条目

第 1 步:
安装 ImageMagick:

下载 ImageMagick:
http://imagemagick.spd.co .il/binaries/ImageMagick-6.8.0-3-Q16-windows-dll.exe

安装 ImageMagick:
*重要提示:安装路径不应包含任何空格。
最好选择“C:\ImageMagick”

请确保选择以下选项:

将应用程序目录添加到您的路径系统
安装 C 和 C++ 的开发头文件和库

第 2 步:
安装 rmagick:

使用以下命令安装 rmagick gem:

gem install rmagick --platform=ruby -- --with-opt-lib=c:/ImageMagick/lib --with-opt-include=c:/ImageMagick/include

via-

http://shoobm.wordpress.com/2013/01/03/installing-rmagick-gem-on-windows-7/

Prerequisites:
Ruby > 1.8.6
DevKit (any version)
No other ImageMagick installation or PATH entry

Step 1:
Installing ImageMagick:

Download ImageMagick:
http://imagemagick.spd.co.il/binaries/ImageMagick-6.8.0-3-Q16-windows-dll.exe

Install ImageMagick:
*Important: The installation path should NOT contain any spaces.
Ideally select “C:\ImageMagick″

Please make sure to select the below options:

Add application directory to your path system
Install development headers and libraries for C and C++

Step 2:
Installing rmagick:

Use the following command to install rmagick gem:

gem install rmagick --platform=ruby -- --with-opt-lib=c:/ImageMagick/lib --with-opt-include=c:/ImageMagick/include

via-

http://shoobm.wordpress.com/2013/01/03/installing-rmagick-gem-on-windows-7/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文