undefined method `rails_root' for Haml::Util:Module

16 views
Skip to first unread message

Bradley Grzesiak

unread,
Dec 2, 2009, 10:36:40 AM12/2/09
to ha...@googlegroups.com
Hey all.

I'm getting this error message when running rake on my rails app:

undefined method `rails_root' for Haml::Util:Module
/Library/Ruby/Gems/1.8/gems/haml-2.2.15/rails/../lib/haml/template.rb:64
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
[...rest of stack trace...]

This happens on my dev machine and the staging and production servers, but not my coworker's dev machine. Any ideas?

Thanks!
:brad

--
Bradley Grzesiak
list...@gmail.com

Nathan Weizenbaum

unread,
Dec 2, 2009, 4:09:33 PM12/2/09
to ha...@googlegroups.com
That's bizarre. rails_root should definitely be defined for 2.2.15... I suppose you could check in lib/haml/util.rb to see if it's really there. Maybe this is some sort of weird version conflict?

--

You received this message because you are subscribed to the Google Groups "Haml" group.
To post to this group, send email to ha...@googlegroups.com.
To unsubscribe from this group, send email to haml+uns...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/haml?hl=en.

Bradley Grzesiak

unread,
Dec 2, 2009, 7:00:14 PM12/2/09
to ha...@googlegroups.com
Yeah, I still don't know the solution. I downgraded to 2.2.8 (from the Changelog, it looks like 2.2.10 would have sufficed), removed 2.2.15, and the problem went away.

Note: this also happened whether I had "haml" or "haml and haml-edge" installed.

And indeed, I checked to ensure `def rails_root` was in util.rb. I also did a `sudo gem pristine haml` on 2.2.15 to no avail, despite being pretty sure no one had modified the gem.

And finally, the problem eventually cropped up on my coworker's machine once we started playing around with haml versions (I think he had a pre-2.2.10 version to start).

*shrug*

:brad
--
Bradley Grzesiak
list...@gmail.com

* You have received an email from my personal account. Please do not divulge this address to any website (eg: evite, shutterfly, etc). I have another address for such uses; please ask me for it.

Nathan Weizenbaum

unread,
Dec 2, 2009, 9:16:50 PM12/2/09
to haml
Another possibility is that there's a problem with load order - that Haml::Util isn't fully loaded, somehow, by the time this happens. Could I see a full stack trace for the error?
Reply all
Reply to author
Forward
0 new messages