This isn't a big problem but I've been curious about this for a while now.
I've got haml installed on a number of projects, all hosted in svn
repos. Every now and then, the vendor/plugins/haml/init.rb will show
changes and want to be committed, and I can't work out why.
A typical diff from svn will show something like this:
Index: vendor/plugins/haml/init.rb
===================================================================
--- vendor/plugins/haml/init.rb (revision 92)
+++ vendor/plugins/haml/init.rb (working copy)
@@ -4,5 +4,4 @@
require 'haml' # From gem
end
-# Load Haml and Sass
Haml.init_rails(binding)
Now I can see what is changed, but I have no idea why. This usually
happens around every 10 commits, not that that helps much but it shows
it's not constant and it's not rare.
I've taken to writing commit logs like "HAML doing it's thing" which
make me smile, but would probably confuse anyone else hugely.
Does anyone have any ideas about why this happens? Am I the only one
this happens to or do other people see this?
Thanks and happy holidays,
Matt
Well I'm glad I'm not the only one to have seen this :)
According to "gem list --local":
haml (2.0.2)
Is the only version installed. I do have some frozen gems, but they
aren't haml (calendar date select and will_paginate).
Ah, I've just thought...I do have Ruby Enterprise Edition installed next
to the standard ruby on my solaris box. The REE installation does happen
to have haml 2.0.6 installed.
But: I only got REE installed this week, and I've been having the
problem for....ever since I first used haml with rails, whenever 2.0.2
came out.
I'm uninstalling the 2.0.2 from the standard ruby install and see how
that goes.
Thanks
Matt
I removed the old 2.0.2 gem and commited "haml doing it's thing" for
hopefully the last time. Then I did a revision or two fixing some page
layout problems. Now however haml is back, this time with exactly the
opposite change:
Index: vendor/plugins/haml/init.rb
===================================================================
--- vendor/plugins/haml/init.rb (revision 97)
+++ vendor/plugins/haml/init.rb (working copy)
@@ -4,4 +4,5 @@
require 'haml' # From gem
end
+# Load Haml and Sass
Haml.init_rails(binding)
It seems weird for haml to keep adding and removing a single comment
line, whatever the reason...but maybe I've just been having too much
xmas alcohol :P
I'll leave it for now and see if anyone has an idea and proves me too
drunk for rails work :D
Thanks
Matt
I've just done
% find / -name *haml*
And that has shown something. There are still files in
/var/ruby/1.8/gem_home relating to haml, even though I have uninstalled
the gem for haml from that ruby installation. I am removing all that
rubbish and I'll see how it goes.
Incidentally, there are some other haml gem installations but they are
frozen and specific to other applications that are hosted on the same
dev server. Could those unpacked gems be interfering even though they
are inside another app's vendor/gems directory?
Thanks
Matt
Well clearing out the files from old gems that weren't removed when the
gem was uninstalled seems to have done the trick :)
I will have to remember in future that uninstalling a gem does not
remove all traces, but at least it appears I've got that annoyance silenced.
Thanks for the hints
Matt