Windows 上的 rmagick 问题
我正在尝试在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
先决条件:
红宝石> 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”
请确保选择以下选项:
第 2 步:
安装 rmagick:
使用以下命令安装 rmagick gem:
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:
Step 2:
Installing rmagick:
Use the following command to install rmagick gem:
via-
http://shoobm.wordpress.com/2013/01/03/installing-rmagick-gem-on-windows-7/