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 trialHaneen Krimly
Courses Plus Student 29,322 PointsGrunt doesnβt work in El Capitan, `to_specs': Could not find 'grunt'
Grunt used to work before, but I have no idea what is going on, I tried to run the Grunt command on my WordPress theme, but it suddenly gave this error
/Users/HRK/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/grunt-0.0.6/lib/grunt/project.rb:18:in `open': No such file or directory - repos (Errno::ENOENT)
from /Users/HRK/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/grunt-0.0.6/lib/grunt/project.rb:18:in `entries'
from /Users/HRK/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/grunt-0.0.6/lib/grunt/project.rb:18:in `generate_files'
from /Users/HRK/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/grunt-0.0.6/lib/grunt/server.rb:13:in `block in <class:Server>'
from /Users/HRK/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/sinatra-1.3.5/lib/sinatra/base.rb:1356:in `configure'
from /Users/HRK/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/grunt-0.0.6/lib/grunt/server.rb:13:in `<class:Server>'
from /Users/HRK/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/grunt-0.0.6/lib/grunt/server.rb:2:in `<module:Grunt>'
from /Users/HRK/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/grunt-0.0.6/lib/grunt/server.rb:1:in `<top (required)>'
from /Users/HRK/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/grunt-0.0.6/bin/grunt:5:in `<top (required)>'
from /Users/HRK/.rbenv/versions/1.9.3-p125/bin/grunt:23:in `load'
from /Users/HRK/.rbenv/versions/1.9.3-p125/bin/grunt:23:in `<main>'
I tried to uninstall Grunt, and then installed it again, now it gives me this
/Users/HRK/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/dependency.rb:315:in `to_specs': Could not find 'grunt' (>= 0) among 16 total gem(s) (Gem::LoadError)
Checked in 'GEM_PATH=/Users/HRK/.rvm/gems/ruby-2.2.1:/Users/HRK/.rvm/gems/ruby-2.2.1@global', execute `gem env` for more information
from /Users/HRK/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/dependency.rb:324:in `to_spec'
from /Users/HRK/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_gem.rb:64:in `gem'
from /Users/HRK/.rvm/rubies/ruby-2.2.1/bin/grunt:22:in `<main>'
from /Users/HRK/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `eval'
from /Users/HRK/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `<main>'
3 Answers
Haneen Krimly
Courses Plus Student 29,322 PointsI finally fixed the issue with this https://gist.github.com/DanHerbert/9520689 It turns out the problem was with Homebrew and NPM
Jason Anders
Treehouse Moderator 145,860 PointsHey Haneen,
First off, I should say that I don't use grunt, and haven't worked with the command line for awhile now, so...
But, the first error you got seems to be that Grunt couldn't find your project, and from what I read, that could be related to El Capitan new System Integrity Protection (SIP) or "Rootless".
The second error shows that you did uninstall grunt, but it doesn't seem to be re-installed. Are you installing from the command line ( gem install grunt )?
From the little bit of research I did, it could be many things, and it seems that there are more than a few developers cursing right now. Maybe post to or search Stack Overflow, or search through google for a more specific answer.
I'm sorry I couldn't be more help, but I hope you get it resolved soon. :)
Haneen Krimly
Courses Plus Student 29,322 PointsHey there! Thanks for answering. I did the SIP thing Still having some issues, maybe it has something to do with the directory of the gems, because it canβt seem to find my grunt-cli gem!
This is what I did to install grunt:
Haneens-MacBook-Pro:~ HRK$ npm install -g grunt-cli
/usr/local/bin/grunt -> /usr/local/lib/node_modules/grunt-cli/bin/grunt
grunt-cli@0.1.13 /usr/local/lib/node_modules/grunt-cli
βββ resolve@0.3.1
βββ nopt@1.0.10 (abbrev@1.0.7)
βββ findup-sync@0.1.3 (lodash@2.4.2, glob@3.2.11)
This is what I get when I run a grunt command
/Users/HRK/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/dependency.rb:315:in `to_specs': Could not find 'grunt' (>= 0) among 24 total gem(s) (Gem::LoadError)
Checked in 'GEM_PATH=/Users/HRK/.rvm/gems/ruby-2.2.1:/Users/HRK/.rvm/gems/ruby-2.2.1@global', execute `gem env` for more information
from /Users/HRK/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/dependency.rb:324:in `to_spec'
from /Users/HRK/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_gem.rb:64:in `gem'
from /Users/HRK/.rvm/rubies/ruby-2.2.1/bin/grunt:22:in `<main>'
from /Users/HRK/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `eval'
from /Users/HRK/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `<main>'
Please help!
Ben Jakuben
Treehouse TeacherI know this is a different error than you are posting, but the solution provided seems like it might still help because your error appears to be related to your paths somehow. Check out this solution on StackOverflow and see if you can determine anything incorrect in your own bash_profile: http://stackoverflow.com/a/12575463/475217
Hope this helps!