March 21st, 2008 admin
if you want to play with merb you might as well get the latest version (0.9.1) from source. Ezra has promised to stabilize the API for 1.0, and there should be fewer fun suprises between releases from here on out.
A good place to start with the installation instructions: Brainspl.at merb-0-9-1. But once you have it, you may find that you wish the merb team got to the documentation sooner rather than later.
The gist of the install is:
sudo gem install merb -y –source http://merbivore.com
sudo gem install merb-more -y –source http://merbivore.com
sudo gem install merb-plugins -y –source http://merbivore.com
Unfortunately with 0.9.1, after you have installed datamapper and all the requisite gems and are able to get your first view waving hello world, you will probably fail on your first link_to with that special message: “undefined method `link_to’ for #”. this may be as surprising to you as it was to me, because my views worked perfectly as long as that offending link_to was not present. I will save you a little bit of frustration and tell you that you need merb-assets in your init.rb as well… Apparently the zest for modularity can take people in the strangest directions. I am not sure why link_to is in merb-assets, but thats where you will find it.
Maybe by the time merb hits 1.0, the team will put some of those assets back in merb_helpers, but in case you are stuck on this error, change your init.rb and add the following line:
dependencies “merb_helpers”, “merb-assets”
Note that unlike merb_helpers, merb-assets uses a dash instead of an underscore. You can usually find me on #merb in IRC if you have any additional questions.
Posted in Merb | 14 Comments »