Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJohnny Garces
Courses Plus Student 8,551 PointsNoMethodError: undefined method `join' for #<ConditionVariable:0x007f9812880a20> Use --trace for backtrace.
This is what I get after going to command line, accessing my project directory that contains both my index.html file and sass (.scss) file. I get the following message:
Sass is watching for changes. Press Ctrl-C to stop.
write ./test.css
write ./test.css.map
NoMethodError: undefined method `join' for #<ConditionVariable:0x007f9812880a20>
Use --trace for backtrace.
Anyone know how I can watch the sass file and have it output to my new css file? Thanks!
Johnny Garces
Courses Plus Student 8,551 PointsHi mikes, yes. I cd into my project folder and type: sass --watch test.scss:test.css
It doesn't allow me to generate new styles on test.css- wondering why that is...
Johnny Garces
Courses Plus Student 8,551 Pointsgem list listen (2.8.3)
mikes02
Courses Plus Student 16,968 PointsOK, so next up try running the trace as recommended, you should be able to do:
sass --watch sass:css --trace
Johnny Garces
Courses Plus Student 8,551 Pointsgot this response and I have one project directory with the two files : 1) index.html 2) main.scss
Sass is watching for changes. Press Ctrl-C to stop.
error No such file or directory - scss
/Library/Ruby/Gems/2.0.0/gems/sass-3.4.8/lib/sass/plugin/compiler.rb:402:in `block in listen_to': undefined method `join' for #<ConditionVariable:0x007ff652829f88> (NoMethodError)
from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.8/lib/sass/plugin/compiler.rb:402:in `each'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.8/lib/sass/plugin/compiler.rb:402:in `listen_to'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.8/lib/sass/plugin/compiler.rb:338:in `watch'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.8/lib/sass/plugin.rb:108:in `method_missing'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.8/lib/sass/exec/sass_scss.rb:370:in `watch_or_update'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.8/lib/sass/exec/sass_scss.rb:50:in `process_result'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.8/lib/sass/exec/base.rb:52:in `parse'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.8/lib/sass/exec/base.rb:19:in `parse!'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.8/bin/sass:13:in `<top (required)>'
from /usr/bin/sass:23:in `load'
from /usr/bin/sass:23:in `<main>'
mikes02
Courses Plus Student 16,968 PointsOK, so it looks like you don't have a sass or css directory, so your files must just be stored in the root directory, let's instead try:
sass --watch test.scss:test.css --trace
Edit: Just saw your post a second time, so your SCSS file is main.scss and not test.scss?
Have you tried running:
sass --watch main.scss:main.css
Johnny Garces
Courses Plus Student 8,551 PointsMaking some progress- I added a new style to the test.scss ( i changed it from main.scss to test.scss) and gave the body a background color of orange. Nothing happened.
I typed in
sass --watch test.scss:test.css --trace
again and was able to see the new style applied. I later changed the scss to include a background-color of blue just to test it out, and nothing happened. I'm guessing that I'll have to include that watch command everytime I want to see a new style applied?
I also got this response from terminal:
Sass is watching for changes. Press Ctrl-C to stop.
/Library/Ruby/Gems/2.0.0/gems/sass-3.4.8/lib/sass/plugin/compiler.rb:402:in `block in listen_to': undefined method `join' for #<ConditionVariable:0x007f9e5d07e448> (NoMethodError)
from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.8/lib/sass/plugin/compiler.rb:402:in `each'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.8/lib/sass/plugin/compiler.rb:402:in `listen_to'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.8/lib/sass/plugin/compiler.rb:338:in `watch'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.8/lib/sass/plugin.rb:108:in `method_missing'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.8/lib/sass/exec/sass_scss.rb:370:in `watch_or_update'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.8/lib/sass/exec/sass_scss.rb:50:in `process_result'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.8/lib/sass/exec/base.rb:52:in `parse'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.8/lib/sass/exec/base.rb:19:in `parse!'
from /Library/Ruby/Gems/2.0.0/gems/sass-3.4.8/bin/sass:13:in `<top (required)>'
from /usr/bin/sass:23:in `load'
from /usr/bin/sass:23:in `<main>'
mikes02
Courses Plus Student 16,968 PointsYou should be able to just remove the --trace:
sass --watch test.scss:test.css
What happens when you run that now that you have your file names updated?
Johnny Garces
Courses Plus Student 8,551 PointsIt looks like I have to keep typing in the watch command everytime I want a new style applied on test.scss
I get this response on terminal
Sass is watching for changes. Press Ctrl-C to stop.
write test.css
write test.css.map
NoMethodError: undefined method `join' for #<ConditionVariable:0x007fcb4888d4f0>
Use --trace for backtrace.
Johnny Garces
Courses Plus Student 8,551 Pointsper my unbridled enthusiasm, yes it worked :) thanks again! I noticed that getting rid of listen prevents me from using Jekyll as it depends on file modifications. I reinstalled Jekyll which includes "listen" and it hasn't affected my Sass in anyway.
so far so good!
mikes02
Courses Plus Student 16,968 PointsHi Johnny,
Sorry if I was unclear, I didn't mean for you to remove Listen completely, only meant for you to try downgrading to a previous version, in this case it was 2.7.11
Just out of curiosity, when you run gem list
now what version is Listen?
Johnny Garces
Courses Plus Student 8,551 Pointsit's currently at 2.10.11 if anything messes up, I'll be sure to install the 2.711 version of listen.
mikes02
Courses Plus Student 16,968 PointsGlad to hear it's working, you were at 2.8.3 and now you are at 2.10.1, while downgrading can often help in cases like this, it seems that upgrading actually took care of the problem, which is great!
Johnny Garces
Courses Plus Student 8,551 Pointsagain- thanks so much for your help! learned something new about command line and gem installations :)
1 Answer
mikes02
Courses Plus Student 16,968 PointsYou shouldn't have to. I think what you are actually going to need to do in this case is downgrade your Listen gem to a previous version. If you're on a Mac you should be able to do:
sudo gem uninstall listen
sudo gem install listen --version 2.7.11
Other solutions are also available here: https://github.com/guard/listen/issues/275#issuecomment-63697308
Johnny Garces
Courses Plus Student 8,551 Pointsyou're a lifesaver, mikes02! i'm curious as to what listen is and how it came into my system. Did it come with a ruby installation?
anyway thank you!
mikes02
Courses Plus Student 16,968 PointsJohnny, did that work?
As for the Listen gem: "The Listen gem listens to file modifications and notifies you about the changes." I believe it would have been installed when you installed Sass, unless it was on your system already.
mikes02
Courses Plus Student 16,968 Pointsmikes02
Courses Plus Student 16,968 PointsFrom the command line are you just using
sass --watch test.scss:test.css
or something along those lines? from the command line type ingem list
and post what version of Listen you are using as well.