#440 ✓resolved
Leonard Chin

merb_datamapper is out of date/version mismatch with dm-more

Reported by Leonard Chin | July 4th, 2008 @ 02:45 PM

Currently attempting a fresh install of merb and datamapper, along with its required prerequisites via rubygems 1.2.

A naive installation following tutorials linked on the merb wiki leads to an installation the datamapper gem, merb_datamapper, dm-core, data_objects and (say) do_sqlite3. These all install fine, but when attempting to run merb, and the following error is returned

$ merb
 ~ Loaded DEVELOPMENT Environment...
 ~ loading gem 'merb_datamapper' ...
 ~ Connecting to database...
You must install the DataObjects::SQLite3 driver.
  gem install do_sqlite3

do_sqlite3 is obviously installed, but actually fails to load because its dependencies are incorrect. Specifically, an incompatibility between the version of datamapper (in this case 0.3.x) and the requirements of the do_sqlite3 driver.

Using more up to date documents, it becomes apparent that instead of datamapper, data_mapper should be used (if at all), along with dm-core and dm-more. When installing dm-more, however, rubygems complains that merb_datamapper 0.9.3 cannot be found. dm-more explicitly requires 0.9.3.

Installing the merb_datamapper gem explicitly succeeds, but ends up installing merb_datamapper 0.9.2 along with datamapper 0.3.2 because the gem spec for merb_datamapper 0.9.2 lists datamapper (and not the current gem data_mapper) as its dependency.

merb fails to run with this set up because it relies on the do_* drivers, which in turn depend on data_mapper (and not datamapper).

If I instead install merb_datamapper without dependencies, manually edit the gem spec to use data_mapper, and then explicitly install the data_mapper gem and the gems referenced by the dm-more meta-gem, merb_datamapper fails to load due to differences in merb_datamapper 0.9.2 (when owned by the merb project), and the merb_datamapper actually demanded by the current versions of merb/data_objects.

Essentially merb cannot currently be used with datamapper due to a release problem.

I think that at least two fixes are required:

1) Release merb_datamapper 0.9.3

2) alias the datamapper gem, or find some way of preventing users from naively installing it.

Documentation should also be updated appropriately on both the merb/datamapper sides.

Comments and changes to this ticket

  • Ben Smith

    Ben Smith July 5th, 2008 @ 10:30 AM

    I've just experienced this exact issue, trying to install Merb and Datamapper for the first time and ended up thoroughly confused. What steps can I take to get a working setup of the two, I don't mind running on edge if that's what it takes?

  • Ben Smith

    Ben Smith July 5th, 2008 @ 05:53 PM

    I ended up installing the bleeding edge Merb & DataMapper from their git repositories with success (http://www.slashdotdash.net/arti.... It would be nice to get this resolved to allow simple installation from the release gems on rubyforge in the future.

  • Daniel Parker

    Daniel Parker July 7th, 2008 @ 11:30 AM

    I just also verified this, when trying to install a datamapper adapter. Basically, merb_datamapper-0.9.2 depends on datamapper-0.3.2, not dm-core-0.9.2. The structure of dm is different, so it won't be coerced to work. Furthermore, datamapper-0.3.2 requires <= do_mysql-0.2.4 to work with mysql. Just to say there is a bunch of version confusion.

    merb_datamapper-0.9.3 seems to be the origin of the problem. Is there a merb_datamapper-0.9.3 out yet? (Of course this is the wrong project to post this in, but the problem is directly related.)

  • Leonard Chin

    Leonard Chin July 8th, 2008 @ 06:32 AM

    Apparently, responsibility for the merb_datamapper project has shifted from the merb guys to the datamapper guys after merb 0.9.2. I think this means that it gets installed by dm-more, but not merb-more.

    The fact that merb is at 0.9.3, while datamapper is still at 0.9.2 also adds to the confusion.

    As for a workaround, folks on #datamapper suggested that I work on the datamapper edge by following the instructions at the below URL.

    http://datamapper.org/articles/s...

    The above worked out without a problem for me.

    Another possible issue is that the datamapper gem source is not compatible with Rubygems 1.2.0. The following command (found on the datamapper installation instructions page) does not work with Rubygems 1.2.0, but works fine for earlier versions.

    gem sources -a http://gems.datamapper.org

    This results in the following error:

    Error fetching http://gems.datamapper.org:
    	bad response Not Found 404 (http://gems.datamapper.org/specs...
    

    The RubyGems 1.2.0 release notes:

    http://blog.segment7.net/article...

    I suspect that everyone having the problem here is actually using RubyGems 1.2.0. When I attempted to install merb_datamapper using RubyGems 1.1.1 and specified gem.datamapper.org with the source command, the merb_datamapper 0.9.3 gem was successfully installed.

    So, another solution is:

    a) for users to downgrade to RubyGems 1.1.1

    b) the datamapper.org admin to update the gem index to 1.2.0

  • Sam Smoot

    Sam Smoot July 8th, 2008 @ 08:31 AM

    • State changed from “new” to “open”
    • Assigned user changed from “Sam Smoot” to “Bernerd Schaefer”

    Bernerd, PDI.

  • Daniel Parker

    Daniel Parker July 8th, 2008 @ 08:34 AM

    Re: Leonard:

    Good info. I also got things working on the edge. merb_datamapper-0.9.3 pretty much resolves the problem. It's just that merb_datamapper-0.9.3 isn't out yet on the "default" repositories. Hopefully the datamapper guys upgrade their gem source compatible to 1.2.0 soon, and we'll all be happy campers!

  • gma

    gma July 14th, 2008 @ 06:24 PM

    I had similar issues tonight, and tried for the easy installation of datamapper edge via sake. After I installed rubygems 1.2.0 I had trouble getting sake installed. You can work round it though.

    I also discovered that you can use edgy to install the entire merb stack from source (not just datamapper), and wrote it all up here: merb and datamapper on the edge

  • Bernerd Schaefer

    Bernerd Schaefer July 29th, 2008 @ 09:24 PM

    • State changed from “open” to “resolved”

    This should now be fixed, since we released the new 0.9.3 gems.

  • Sam Smoot

    Sam Smoot July 31st, 2008 @ 06:15 PM

    The issue appears to be that the merb project has it's own 0.9.2 release and it's being picked up first, ignoring our later version.

    Ezra's given me access to publish our update to the merb project's rubyforge project page, so this should resolve the issue once it's propagated.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket

Referenced by

Pages