# Rmagick is using the wrong file path

**URL:** <https://www.ruby-forum.com/t/rmagick-is-using-the-wrong-file-path/111345>\
**Category:** Rails\
**Created:** [August 6, 2007, 11:46am UTC](https://www.ruby-forum.com/t/rmagick-is-using-the-wrong-file-path/111345 "2007-08-06T11:46:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cmaxvv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/85f322/32.png) [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Post date:** [August 6, 2007, 11:46am UTC](https://www.ruby-forum.com/t/rmagick-is-using-the-wrong-file-path/111345/1 "2007-08-06T11:46:18Z")

</div>

I’m having problems with rmagick: It works but is looking in the wrong  
directory.

My environment has the following lines:

1. require ‘rubygems’
2. require ‘RMagick’
3. include Magick

My controller has the following:

1. imagemagick\_for ‘/data/pictures/’
2. #my pics are in newspipe/data/pictures, where newspipe is my app

And in my view i use image\_magick with

1. \<%= imagemagick\_tag “pic32.jpg”, ‘resize(100x100)’ %\>

But the generated html has this for the above line:

![Pic32](http://localhost:3000/newspipe/imagemagick/pic32.jpg?commands=resize%28100x100%29)

Can anyone see what i’m doing wrong (or neglecting to do)?  
thanks  
max
