Hi. I've just committed some patches to merb-core and merb-gen that I believe will help make bundled Merb 1.1 apps much easier to work with. Traditionally when you bundle your gems within a merb app, you resign yourself to having to remember to use bin/rake, bin/merb, bin/spec, bin/cucumber whenever you want to interact with your application. This is fine for many (and it will still work with this patch), however I often would like to run rake, merb, spec without always remember to prefix it with bin/
Using the generated bundler gems/environment file in place of rubygems, I believe this patch will allow you to use any system gem (merb, rake, etc...) with the your app's bundler. Tried it out on a few newly generated merb apps, and it works well. If you can, please help me test this out so I can catch any edge cases and handle them http://github.com/merbjedi/merb/commits/edge Here's how to install the merb gems from my fork (edge branch): git clone git://github.com/merbjedi/merb.git cd merb git checkout edge rake install Then create a new project using merb-gen: merb-gen app testproj cd testproj # list rake task using system rubygems rake -T # launch a merb console using system rubygems merb -i gem bundle # launch a merb console from bundled bin bin/merb -i # launch a merb console from system bin (using bundle environment) merb - i # list rake tasks from bundled bin bin/rake -T # list rake tasks from system bin (using bundle environment) rake -T You can edit any existing project to use this approach by adding this to the top of your #{Merb.root}/Rakefile begin # Load the bundler environment from #{Merb.root}/gems/ environment.rb require File.join(File.dirname(__FILE__), "gems", "environment") rescue LoadError # Default to using system rubygems not bundled require "rubygems" end And this to the top of your #{Merb.root}/spec/spec_helper.rb begin # Load the bundler environment from #{Merb.root}/gems/ environment.rb require File.join(File.dirname(__FILE__), "..", "gems", "environment") rescue LoadError # Default to using system rubygems not bundled require "rubygems" end Any feedback great welcomed. Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "merb" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/merb?hl=en -~----------~----~----~----~------~----~------~--~---
