Interesting. Does this actually work for you? I can't get this to work
with Haml 2.0.2 and Rails 2.1.1.
There does seem to be at least a couple of bugs in Rails' support of
I found that Haml froze fine in Rails 2.1 but on updating to 2.1.1 it
wouldn't work anymore without the patch attached to that ticket.
Evidently Rails is choking on the -2.0.2 in the gem's folder name.
But there seems to be another issue in that ticket, about the
"init.rb" and "rails/init.rb" files not get evaluated in the right
order, from the right place, or at all (the behaviour is
I found that when I tried deploying to the remote server I was
suddenly getting "uninitialized constant Rails::Initializer::Sass"
errors. Turns out that the difference was that my local machine had
2.0.2 installed as a gem system-wide and the remote deployment machine
only had 1.8.2. Once I remove the system-wide copies of the Haml gem I
was able to reproduce the flaw on the local machine too.
Further investigation showed that neither "init.rb" nor "rails/
init.rb" was getting evaluated in the frozen copy of the gem.
Workaround was to move the gem back to vendor/plugins/haml again.
I do have one other gem frozen into vendor/gems/ and that one works
fine even though no other copy is installed system-wide, probably
because that particular gem doesn't depend on anything being done in
"init.rb" or "rails/init.rb".
Would like to see this fixed, but not sure exactly where the fault
lies. Looks to me like it might be a Rails bug if those files aren't
getting evaluated. What do people think?