This is very strange. I haven't seen this before, so it sounds like it may be a new bug.
I'd greatly appreciate it if you could create a minimal Rails app that demonstrates the issue you're having. If I can reproduce this, I can fix it for you and others who might come across it in the future. On Thu, Jun 3, 2010 at 1:30 AM, yannis_ <[email protected]> wrote: > Hi Nathan, > I still got the following error when I start the rails console: > /usr/local/lib/ruby/gems/1.8/gems/haml-3.0.6/lib/haml/util.rb:267:in > `rails_root': ERROR: Rails.root is nil! (RuntimeError) > > My gemfile is looking either like > > gem "rails", :git => "git://github.com/rails/rails.git" > gem "mysql", '2.8.1' > gem "haml", '3.0.6' > > or > > gem "rails", '3.0.0.beta3' > gem "mysql", '2.8.1' > gem "haml", '3.0.6' > > The workaround I found is to use the Sass --watch command and > specifying the path to my sass folder. > Thank you very much for taking the time to answer me. > Yannis > > On Jun 1, 1:12 am, Nathan Weizenbaum <[email protected]> wrote: > > The Rails.root error is correct (to an extent) in this case. What's > > happening is that one of the many gems you're requiring isn't playing > nicely > > with Rails 3. Rails 3 lazy-loads all of its internals, so it's possible > for > > gems to force some parts of it to be loaded too early. This ends up > meaning > > that Haml gets loaded before Rails.root gets set. > > > > The reason for the stylesheet-not-updating error is that, since > Rails.root > > isn't set, Sass doesn't know where to look for your stylesheets. In more > > recent releases like 3.0.6, Sass raises a more informative error rather > than > > letting it silently fail. > > > > Haml does try to work around other gems' lack of Rails 3 compatibility, > so > > if you can figure out which gem in particular is causing this I'll try to > > fix it. > > > > On Mon, May 31, 2010 at 1:22 AM, yannis_ <[email protected] > >wrote: > > > > > > > > > Hi everyone and many thanks for your answers. > > > I'm with haml 3.0.2. > > > My Sass::Plugin.options were {:css_location=>"/public/ > > > stylesheets", :template_location=>"/public/stylesheets/ > > > sass", :always_update=>false, :cache_location=>"/tmp/sass- > > > cache", :always_check=>true, :full_exception=>true, :quiet=>true}. > > > I did set Sass::Plugin.options[:always_update] to true in > > > application.rb, but my stylesheets are still not updated. > > > I also tried to update my Haml/Sass gem to the last version (3.0.6) > > > but now get a > > > /Users/yannis/.bundle/ruby/1.8/gems/haml-3.0.3/lib/haml/util.rb:265:in > > > `rails_root': ERROR: Rails.root is nil! (RuntimeError) > > > when I restart my app. Reverting to 3.0.2 allows my app to work but > > > the stylesheets are not updated. How can I fix this Rails.root error? > > > > > By the way, I have the following gem required for my app: > > > > > * abstract (1.0.0) > > > * actionmailer (3.0.0.beta3) > > > * actionpack (3.0.0.beta3) > > > * activemodel (3.0.0.beta3) > > > * activerecord (3.0.0.beta3) > > > * activeresource (3.0.0.beta3) > > > * activesupport (3.0.0.beta3) > > > * arel (0.3.3) > > > * bio (1.4.0) > > > * builder (2.1.2) > > > * bundler (0.9.25) > > > * cancan (1.1.1) > > > * devise (1.1.rc1) > > > * erubis (2.6.5) > > > * haml (3.0.2) > > > * hpricot (0.8.2) > > > * i18n (0.3.7) > > > * mail (2.2.1) > > > * memcache-client (1.8.3) > > > * mime-types (1.16) > > > * mysql (2.8.1) > > > * net-ldap (0.1.1) > > > * paperclip (2.3.2 bdc48f) > > > * polyglot (0.3.1) > > > * rack (1.1.0) > > > * rack-mount (0.6.3) > > > * rack-test (0.5.4) > > > * rails (3.0.0.beta3) > > > * railties (3.0.0.beta3) > > > * rake (0.8.7) > > > * remotipart (0.1.0) > > > * text-format (1.0.0) > > > * text-hyphen (1.0.0) > > > * thor (0.13.6) > > > * treetop (1.4.8) > > > * tzinfo (0.3.22) > > > * warden (0.10.7) > > > > > On May 28, 6:51 pm, Nathan Weizenbaum <[email protected]> wrote: > > > > What version of Haml/Sass are you using? Versions prior to 3.0.3 are > > > known > > > > to interact poorly with non-Rails3-ready plugins like will_paginate. > > > > > > On Fri, May 28, 2010 at 7:30 AM, yannis_ < > [email protected] > > > >wrote: > > > > > > > Hi everyone, > > > > > I'm currently developing a small Rails3 app, using Haml and Sass. > > > > > In the development environment, after edition of the sass files, > the > > > > > corresponding css files are not updated on page reload. > > > > > I've to force the update through the Sass --update command. > > > > > Am I missing some settings? Someone could help? > > > > > Thanks in advance, > > > > > Yannis > > > > > > > -- > > > > > 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]<haml%[email protected]> > <haml%[email protected]<haml%[email protected]> > >< > > > haml%[email protected]<haml%[email protected]> > <haml%[email protected]<haml%[email protected]> > > > > > >. > > > > > For more options, visit this group at > > > > >http://groups.google.com/group/haml?hl=en. > > > > > -- > > > 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]<haml%[email protected]>< > haml%[email protected]<haml%[email protected]> > >. > > > For more options, visit this group at > > >http://groups.google.com/group/haml?hl=en. > > -- > 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] <haml%[email protected]>. > For more options, visit this group at > http://groups.google.com/group/haml?hl=en. > > -- 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.
