merb + datamapper version frustration

I read about Merb and Datamapper and wanted to try them out. Merb does not have particularly good documentation at the moment, but I found some blog posts about how to install.

Unfortunately it turns out that at the moment just doing a “gem install merb” and equivalent for datamapper leaves you with a system that doesn’t work, due to a version mismatch between the systems. So the recommended way to install is to check out the trunk source for each and build it. This is fraught with danger as well – since the trunk is being worked on, the instructions of blog posts even a few weeks old were out of date.

I tried these instructions and these but both failed at stages in the build process. The closest I got was with these instructions which gave more detail of cloning git repositories and building.

The main problems were:

  • ‘merb-core’ has recently had some code pulled out into ‘merb-extlib’ which it now depends on, so you have to clone and build that first.
  • ‘merb-plugins’ and ‘dm-more’ both consist of a number of sub-projects, and have rake files that are supposed to build them all. However those didn’t work, so I had to build each subproject separately.

Here’s an edited version of my command history which may help some people, used along with these instructions (but who knows how long this will be valid?):


git clone git://github.com/wycats/merb-extlib.git
cd merb-extlib ; rake install ; cd ..
git clone git://github.com/wycats/merb-core.git
git clone git://github.com/wycats/merb-plugins.git
git clone git://github.com/wycats/merb-more.git
cd merb-core ; rake install ; cd ..
cd merb-more ; rake install ; cd ..
cd merb-plugins/
cd merb_helpers/
rake install
cd ..

git clone git://github.com/sam/dm-core.git
git clone git://github.com/sam/dm-more.git
cd dm-core ; rake install ; cd ..
cd dm-more/
cd dm-migrations; rake install; cd ..
cd merb_datamapper; rake install; cd ..
cd dm-adjust; rake install; cd ..
cd dm-aggregates; rake install; cd ..
cd dm-ar-finders; rake install; cd ..
cd dm-cli; rake install; cd ..
cd dm-observer; rake install; cd ..
cd dm-querizer; rake install; cd ..
cd dm-serializer; rake install; cd ..
cd dm-shorthand; rake install; cd ..
cd dm-timestamps; rake install; cd ..
cd dm-types; rake install; cd ..
cd dm-validations; rake install; cd ..
for f in dm-is-*; do cd $f; rake install; cd ..; done

One Comment

  1. Posted July 31, 2008 at 2:39 am | Permalink

    I just successfully installed merb+datamapper yesterday, July 30 (after solving some problems). I was able to install merb 0.9.3. The main problem I had was that I always got merb_datamapper 0.9.2 even though 0.9.3 should have been uploaded to RubyForge sometime yesterday.

    My workaround was to download the merb_datamapper-0.9.3.gem from RubyForge and run the gem install merb_datamapper on that.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*