Hi David,
What I have been using in my Rails 2.2 applications recently is Haml as a
submodule from github right into vendor/gems/haml - so if you are using git
to version-control your rails application, you might find this information
useful.

As you probably know, Rails 2.2 has this really stupid way of handling
vendor/gems - it requires the directory to be named vendor/gems/haml-2.0.6 -
and that is just plain silly. And even more than that, it requires to
install the gem and then it somehow "copies" the installed gem into rails ..
or some other weird thing that it does. It's just crazy.

I think my way is better, what I do is add the gems right into vendor/gems,
and then just checkout the correct tag (like 2.0.6) and submit that into my
own git.

cd RAILS_ROOT
git add submodule git://github.com/nex3/haml.git vendor/gems/haml
cd vendor/gems/haml
git co -b 2.0.6 2.0.6
# http://gist.github.com/41380 as RAILS_ROOT/lib/rails_vendor_gems_ng.rb
cd RAILS_ROOT
git submodule update
git commit

This makes haml be an integral part of my rails project, and when I need to
switch to a newer version - I just go to vendor/gems/haml do a "git co -b
2.0.7 2.0.7", "git submodule update", and "git commit" ... that moves haml
to a newer version and all my team mates on the project get the new haml gem
as part of the application we are working on.


Would love to hear comments if anyone has any ... but other than that, it
might solve your problem in an even better way.


-
evgeny


On Mon, Dec 29, 2008 at 1:14 PM, David Trasbo <[email protected]> wrote:

>
> Hello there,
>
> First of all: I'm a huge fan of Haml. When I first started to learn
> Rails, the default templating language Erb was making me sick, I
> almost stopped using Rails because of it. Fortunately, I found
> Haml. :)
>
> But I'm having a bit trouble with it eventually. I would like to use
> Rails' gem dependencies feature that enables me to run "rake
> gems:install" to install all the gems my application need. This is
> what my dependency looks like:
>
> config.gem "nex3-haml", :lib => "haml", :version => '2.0.6', :source
> => "http://gems.github.com";
>
> But when I run the "rake gems:install" command I get this error
> message:
>
> rake aborted!
> no such file to load -- haml
>
> The trace doesn't seem to be useful, but If you want I'll paste it
> here later. Anyway, why is this error message appearing, and how can I
> solve this? Thanks! :)
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Haml" 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/haml?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to