rmagick library dependencies

35 views
Skip to first unread message

Matt S

unread,
Aug 17, 2009, 10:52:49 AM8/17/09
to Moonshine
We have a config.gem entry for rmagick in our environment.rb file (see
below). But, the library dependencies (listed in apt-gems.yml) are
not installed. We also tried adding an apt-gems entry to
moonshine.yml.

Is another step necessary to ensure the library dependencies are
installed?


In environment.rb:
config.gem 'rmagick', :version =>'>= 2.9.0', :lib => 'RMagick2'

In moonshine.yml:
:apt_gems:
:rmagick:
- imagemagick
- libmagick9-dev

We also tried this on jaunty, using:
:apt_gems:
:rmagick:
- imagemagick
- libmagickcore-dev

Matt S

unread,
Aug 20, 2009, 12:19:14 PM8/20/09
to Moonshine
So.. we forked the project and added tests to test/moonshine/manifest/
rails_test.rb (see below). These pass, but the libraries are NOT
installed.

Any ideas?
--matt

def test_magically_loads_rmagick_dependencies_from_apt_gems
#uses apt_gems.yml
@manifest.configure(:gems => [{ :name => 'rmagick' }])
@manifest.rails_gems
assert_not_nil @manifest.packages['rmagick']
assert_not_nil @manifest.packages['imagemagick']
assert_not_nil @manifest.packages['libmagick9-dev']
end

def test_rmagick_dependency_is_only_added_if_gem_rmagick_is_included
#uses apt_gems.yml
@manifest.configure(:gems => [])
@manifest.rails_gems
assert_nil @manifest.packages['rmagick']
assert_nil @manifest.packages['imagemagick']
assert_nil @manifest.packages['libmagick9-dev']
end

Matt S

unread,
Aug 20, 2009, 3:15:16 PM8/20/09
to Moonshine
We tested the "system" dependencies functionality by requiring various
gems.
thoughtbot-paperclip: failed. It depends on rmagick gem.
nokogiri. Worked.

We are proceeding under the assumption that rmagick lib dependencies
did not match the rmagick gem version. We could not find any
information that stipulated what imagemagick versions work with what
rmagick versions. We are moving back to jaunty, since we know what
the dependencies.

Cross your fingers.

Matt S

unread,
Aug 20, 2009, 3:24:08 PM8/20/09
to Moonshine
So... using nokogiri, we have confirmed that the "system" dependencies
(listed in apt_gems.yml) are automatically installed when a gem is
listed in the gems.yml.

To install a gem with system library dependencies:
1. add the config.gem statement.
2. `rake moonshine:gems` to update gems.yml
3. Ensure the gem is supported in apt_gems.yml (docs indicate that an
'apt_gems' entry in moonshine.yml will work, we haven't confirmed this
yet.)
3. commit.
4. `cap deploy`

But... there is a problem with rmagick.

Jesse Newland

unread,
Aug 20, 2009, 3:26:41 PM8/20/09
to Moonshine
Matt -

This is particularly strange. I don't have time to dig into this right
now, but I'll see what I can do this evening or tomorrow!

Matt S

unread,
Aug 20, 2009, 5:40:05 PM8/20/09
to Moonshine
We were able to get rmagick to work on jaunty, with appropriate
entries for apt_gems. I'll post our working files soon.

I believe our problem was that we did not have the appropriate rmagick
gem version to match the imagemagick libraries on intrepid. It's just
a guess, but I think we have eliminated everything else. Do you know
what version(s) of the rmagick gem works?

--Matt

Matt S

unread,
Aug 21, 2009, 9:07:14 AM8/21/09
to Moonshine
We also seem to be getting more help from the error messages. We keep
asking ourselves if they have changed, but we are pretty sure it is
just us. Becoming more familiar with what to pay attention to and
what to filter out.

Matt S

unread,
Aug 27, 2009, 10:14:25 AM8/27/09
to Moonshine
If you are using jaunty (9.04), add this to your moonshine.yml,
:apt_gems:
:rmagick:
- imagemagick
- libmagickcore-dev
- libmagickwand-dev

Matt S

unread,
Aug 27, 2009, 2:15:32 PM8/27/09
to Moonshine
Nope. Sorry. I take that back.

Adding it to moonshine.yml does NOT override the existing apt_gems.yml
entry. darn.
We tried :rmagick: and rmagick: (symbol & string).

Two options:
1. Replace the rmagick entry in the plugin's apt_gems.yml with those
entries.
2. Comment out the rmagick entry in the plugin's apt_gems.yml (and add
the new ones to moonshine.yml).

--matt

On Aug 27, 10:14 am, Matt S <ma...@possiamo.com> wrote:
> If you are using jaunty (9.04), add this to your moonshine.yml,
> :apt_gems:
>   :rmagick:
>     - imagemagick
>     - libmagickcore-dev
>     - libmagickwand-dev
>
> On Aug 21, 9:07 am, Matt S <ma...@possiamo.com> wrote:
>
>
>
> > We also seem to be getting more help from the error messages.  We keep
> > asking ourselves if they have changed, but we are pretty sure it is
> > just us.  Becoming more familiar with what to pay attention to and
> > what to filter out.
>
> > On Aug 20, 5:40 pm, Matt S <ma...@possiamo.com> wrote:
>
> > > We were able to getrmagickto work on jaunty, with appropriate
> > > entries for apt_gems.  I'll post our working files soon.
>
> > > I believe our problem was that we did not have the appropriatermagick
> > > gem version to match the imagemagick libraries on intrepid.  It's just
> > > a guess, but I think we have eliminated everything else.  Do you know
> > > what version(s) of thermagickgem works?
>
> > > --Matt
>
> > > On Aug 20, 3:26 pm, Jesse Newland <je...@railsmachine.com> wrote:
>
> > > > Matt -
>
> > > > This is particularly strange. I don't have time to dig into this right
> > > > now, but I'll see what I can do this evening or tomorrow!
>
> > > > On Aug 20, 3:24 pm, Matt S <ma...@possiamo.com> wrote:
>
> > > > > So... using nokogiri, we have confirmed that the "system" dependencies
> > > > > (listed in apt_gems.yml) are automatically installed when a gem is
> > > > > listed in the gems.yml.
>
> > > > > To install a gem with system library dependencies:
> > > > > 1. add the config.gem statement.
> > > > > 2. `rake moonshine:gems` to update gems.yml
> > > > > 3. Ensure the gem is supported in apt_gems.yml (docs indicate that an
> > > > > 'apt_gems' entry in moonshine.yml will work, we haven't confirmed this
> > > > > yet.)
> > > > > 3. commit.
> > > > > 4. `cap deploy`
>
> > > > > But... there is a problem withrmagick.
>
> > > > > On Aug 20, 3:15 pm, Matt S <ma...@possiamo.com> wrote:
>
> > > > > > We tested the "system" dependencies functionality by requiring various
> > > > > > gems.
> > > > > > thoughtbot-paperclip: failed.  It depends onrmagickgem.
> > > > > > nokogiri.  Worked.
>
> > > > > > We are proceeding under the assumption thatrmagicklib dependencies
> > > > > > did not match thermagickgem version.  We could not find any
> > > > > > information that stipulated what imagemagick versions work with what
> > > > > >rmagickversions.  We are moving back to jaunty, since we know what
> > > > > > > > We have a config.gem entry forrmagickin our environment.rb file (see
Reply all
Reply to author
Forward
0 new messages