imathis / guard-jekyll-plus

A Guard plugin for smarter Jekyll builds
MIT License
63 stars 16 forks source link

Can't init #6

Closed parkr closed 11 years ago

parkr commented 11 years ago

I decided for this small project I'd use this newfangled Guardfile of yours! Unfortunately the init process seems to have some naming issue. I think the solution is just to rename the file to jekyll-plus.rb inside lib/guard. Have you seen this?

~/code/bookmarks.parkermoore.de$ be guard init jekyll-plus
17:55:26 - ERROR - Could not load 'guard/jekyll-plus' or '~/.guard/templates/jekyll-plus' or find class Guard::Jekyllplus
~/code/bookmarks.parkermoore.de$ be guard init jekyllplus
/Users/parker/.rbenv/versions/1.9.3-p362/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:296:in `to_specs': Could not find 'guard-jekyllplus' (>= 0) among 30 total gem(s) (Gem::LoadError)
Using guard (1.8.1)
Installing guard-jekyll-plus (1.2.3)
imathis commented 11 years ago

Are you using the latest version? I believe this has been fixed.

On Jul 22, 2013, at 10:58, Parker Moore notifications@github.com wrote:

I decided for this small project I'd use this newfangled Guardfile of yours! Unfortunately the init process seems to have some naming issue. I think the solution is just to rename the file to jekyll-plus.rb inside lib/guard. Have you seen this?

~/code/bookmarks.parkermoore.de$ be guard init jekyll-plus 17:55:26 - ERROR - Could not load 'guard/jekyll-plus' or '~/.guard/templates/jekyll-plus' or find class Guard::Jekyllplus ~/code/bookmarks.parkermoore.de$ be guard init jekyllplus /Users/parker/.rbenv/versions/1.9.3-p362/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:296:in `to_specs': Could not find 'guard-jekyllplus' (>= 0) among 30 total gem(s) (Gem::LoadError) Using guard (1.8.1) Installing guard-jekyll-plus (1.2.3) — Reply to this email directly or view it on GitHub.

parkr commented 11 years ago

Yes! I was using the latest version that is tagged in this repo, v1.2.3. I'll try to figure it out and will send a PR if I can get it going.

In the meantime, ruthlessly stealing from the Octopress Rakefile:

task :preview do
  puts "Starting to watch source with Jekyll and Compass. Starting Rack on port 4000"
  jekyllPid = Process.spawn("jekyll serve -w")
  compassPid = Process.spawn("compass watch")

  trap("INT") {
    [jekyllPid, compassPid].each { |pid| Process.kill(9, pid) rescue Errno::ESRCH }
    exit 0
  }

  [jekyllPid, compassPid].each { |pid| Process.wait(pid) }  
end
imathis commented 11 years ago

Fixed by this commit. Thanks :)