Stumped with installation issues
johnfmorton opened this issue · 7 comments
I've been trying to diagnose my installation issue for a day without success.
I've got Jekyll installed globally and can build a Jekyll site the "old fashion way" by doing this in my terminal:
jekyll new directoryformysite
cd directoryformysite
jekyll serve
But, I've used the generator-jekyllrb workflow quite a while now and am having trouble with it. I'm setting up a new machine node (with nvm) and ruby (with rvm). I've installed yeoman and the basic 'webapp' generate works fine for me. The "generator-jekyllrb" keeps giving me errors unfortunately.
The first seems be only when I wasn't selecting one of the 2 available templates. (The default selection was throwing an error for me as described here: #142)
If I do pick a template (i.e. choosing Default Jekyll) the yo jekyllrb command completes successfully.
Next I need to to an npm install & bower install. Finally, I try to serve the basic site I've built and I get an error I'm not able to get past.
Warning: Running "jekyll:server" (jekyll) task
>> Error: Command failed: /bin/sh -c jekyll -v
>> /Users/john/.rvm/gems/ruby-2.2.0/gems/bundler-1.8.4/lib/bundler/dsl.rb:35:in `rescue in eval_gemfile': Gemfile syntax error on line 3: syntax error, unexpected tIDENTIFIER, expecting end-of-input (Bundler::GemfileError)
>> gem 'jekyll', '~> 2.3.0'gem 'redcarpet' gem 'compass', '~> 1.0.1'
>> ^
>> from /Users/john/.rvm/gems/ruby-2.2.0/gems/bundler-1.8.4/lib/bundler/dsl.rb:31:in `eval_gemfile'
>> from /Users/john/.rvm/gems/ruby-2.2.0/gems/bundler-1.8.4/lib/bundler/dsl.rb:10:in `evaluate'
>> from /Users/john/.rvm/gems/ruby-2.2.0/gems/bundler-1.8.4/lib/bundler/definition.rb:25:in `build'
>> from /Users/john/.rvm/gems/ruby-2.2.0/gems/bundler-1.8.4/lib/bundler.rb:155:in `definition'
>> from /Users/john/.rvm/gems/ruby-2.2.0/gems/bundler-1.8.4/lib/bundler.rb:118:in `setup'
>> from /Users/john/.rvm/gems/ruby-2.2.0/gems/jekyll-2.5.3/lib/jekyll/plugin_manager.rb:37:in `require_from_bundler'
>> from /Users/john/.rvm/gems/ruby-2.2.0/gems/jekyll-2.5.3/bin/jekyll:16:in `<top (required)>'
>> from /Users/john/.rvm/gems/ruby-2.2.0/bin/jekyll:23:in `load'
>> from /Users/john/.rvm/gems/ruby-2.2.0/bin/jekyll:23:in `<main>'
>> from /Users/john/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `eval'
>> from /Users/john/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `<main>'
Warning: Please install Jekyll before running this task. Use --force to continue.
Aborted due to warnings.
To see this in action, going through this process after a clean build of a "generator-jekyllrb" workflow.
The error says I do not have Jekyll installed which I do.
If I run "jekyll -v" in the directory before running "grunt server" I will see:
$ jekyll -v
jekyll 2.5.3
After running it though, I get this same error as I get when running grunt serve:
$ jekyll -v
/Users/john/.rvm/gems/ruby-2.2.0/gems/bundler-1.8.4/lib/bundler/dsl.rb:35:in `rescue in eval_gemfile': Gemfile syntax error on line 3: syntax error, unexpected tIDENTIFIER, expecting end-of-input (Bundler::GemfileError)
gem 'jekyll', '~> 2.3.0'gem 'redcarpet' gem 'compass', '~> 1.0.1'
^
from /Users/john/.rvm/gems/ruby-2.2.0/gems/bundler-1.8.4/lib/bundler/dsl.rb:31:in `eval_gemfile'
from /Users/john/.rvm/gems/ruby-2.2.0/gems/bundler-1.8.4/lib/bundler/dsl.rb:10:in `evaluate'
from /Users/john/.rvm/gems/ruby-2.2.0/gems/bundler-1.8.4/lib/bundler/definition.rb:25:in `build'
from /Users/john/.rvm/gems/ruby-2.2.0/gems/bundler-1.8.4/lib/bundler.rb:155:in `definition'
from /Users/john/.rvm/gems/ruby-2.2.0/gems/bundler-1.8.4/lib/bundler.rb:118:in `setup'
from /Users/john/.rvm/gems/ruby-2.2.0/gems/jekyll-2.5.3/lib/jekyll/plugin_manager.rb:37:in `require_from_bundler'
from /Users/john/.rvm/gems/ruby-2.2.0/gems/jekyll-2.5.3/bin/jekyll:16:in `<top (required)>'
from /Users/john/.rvm/gems/ruby-2.2.0/bin/jekyll:23:in `load'
from /Users/john/.rvm/gems/ruby-2.2.0/bin/jekyll:23:in `<main>'
from /Users/john/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `eval'
from /Users/john/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `<main>'
It's like my directory is corrupted for use with Jekyll now. I see the simple "jekyll" command is now looking at the Gemfile in my directory. I'm just lost now. Any help?
@johnfmorton I (have) had the exact same issue. I uninstalled and reinstalled Ruby, making sure to check the "include executables to env path" option during install, and followed instructions here http://yeoman.io/learning/index.html. Now everything is smooth. Perhaps worth a try? I'm running windows 7.
@asilvadesigns I will try that and report back. Thanks for the reply and suggestion.
Thanks for the tip @asilvadesigns. No luck on my end unfortunately. I'm stuck still.
I wanted to post a correction to one of the assertions I made in the initial post in this chain. I had said that after running grunt serve
the command jekyll -v
was generating the error described above. That's not actually the case.
In a fresh directory where I intend to make a jekyll site, I can run jekyll -v
before starting the yo jekyllrb
build and it will return the expected result jekyll 2.5.3
.
After running yo jekyllrb
and going through all the initialization steps which will generate all the files, I can try jekyll -v
and the command already throws the error described earlier. The error doesn't occur because grunt serve
has been run in the directory.
I'm not sure if this sheds any new light on this issue I'm having but I'm still investigating how to solve this problem. Any help is appreciated. Thanks.
I've got things working by going into my Gemfile and breaking it up like this following.
source "http://rubygems.org"
gem 'jekyll', '~> 2.3.0'
gem 'redcarpet'
gem 'compass', '~> 1.0.1'
This is instead of the way it came out originally after the yo jekyllrb
process.
source "http://rubygems.org"
gem 'jekyll', '~> 2.3.0'gem 'redcarpet' gem 'compass', '~> 1.0.1'
It seems the line breaks between the different gems made the difference.
After updating the Gemfile, I ran the following:
bundle install
This installed a bunch of things outputting the following:
~/sites/mytestsite
$ bundle install
Fetching gem metadata from http://rubygems.org/.........
Fetching version metadata from http://rubygems.org/..
Resolving dependencies...
Using blankslate 2.1.2.4
Using hitimes 1.2.2
Using timers 4.0.1
Using celluloid 0.16.0
Using chunky_png 1.3.4
Using fast-stemmer 1.0.2
Using classifier-reborn 2.0.3
Using coffee-script-source 1.9.1
Using execjs 2.4.0
Using coffee-script 2.3.0
Using colorator 0.1
Using multi_json 1.11.0
Using sass 3.4.13
Using compass-core 1.0.3
Using compass-import-once 1.0.5
Using rb-fsevent 0.9.4
Using ffi 1.9.8
Using rb-inotify 0.9.5
Using compass 1.0.3
Using jekyll-coffeescript 1.0.1
Using jekyll-gist 1.1.0
Using jekyll-paginate 1.1.0
Using jekyll-sass-converter 1.3.0
Using listen 2.9.0
Using jekyll-watch 1.2.1
Using kramdown 1.6.0
Using liquid 2.6.2
Using mercenary 0.3.5
Using posix-spawn 0.3.10
Using yajl-ruby 1.2.1
Using pygments.rb 0.6.2
Using redcarpet 3.2.2
Using safe_yaml 1.0.4
Using parslet 1.5.0
Using toml 0.1.2
Using jekyll 2.3.0
Using bundler 1.8.4
Bundle complete! 3 Gemfile dependencies, 37 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
Now when I use grunt serve
, the site launches successfully.
I still find error in my console because some files are not in the expected places. Specifically, here are the errors I'm seeing:
Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:3001/css/main.css Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:3001/css/syntax.css Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:3001/css/main.css Failed to load resource: the server responded with a status of 404 (Not Found)
These are all errors I can address with some HTML editing so I'm not too worried about them since they are not deal breakers but it would be preferable not to have to have them at all. I'm using the "Default Jekyll template" in this example.
Thanks for reading. I hope this is helpful.
Hi, Can we submit a PR to clean up the Gem?
Also, and it may be related, I experienced the same issue with two local jekyll versions. Fixed it by running 'gem list jekyll' then 'gem uninstall' on the offending jekyll. Now it loads fine.
I supposed I could have tried updating the jekyll version in the gemfile but decided it best to stick with prescribed jekyll version 2.3.0
grunt serve -f
Running "serve" task
Running "clean:server" (clean) task
0 paths cleaned.
Running "concurrent:server" (concurrent) task
Running "jekyll:server" (jekyll) task
>> Error: Command failed: /bin/sh -c jekyll -v
>> WARN: Unresolved specs during Gem::Specification.reset:
>> listen (~> 2.7)
>> WARN: Clearing out unresolved specs.
>> Please report a bug if this causes problems.
>> /Users/marc/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/jekyll-2.5.3/bin/jekyll:21:in `block in <top (required)>': cannot load such file -- jekyll/version (LoadError)
>> from /Users/marc/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/mercenary-0.3.5/lib/mercenary.rb:18:in `program'
>> from /Users/marc/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/jekyll-2.5.3/bin/jekyll:20:in `<top (required)>'
>> from /Users/marc/.rbenv/versions/1.9.3-p448/bin/jekyll:23:in `load'
>> from /Users/marc/.rbenv/versions/1.9.3-p448/bin/jekyll:23:in `<main>'
Warning: Please install Jekyll before running this task. Used --force, continuing.
Warning: Task "jekyll:server" failed. Used --force, continuing.
Done, but with warnings.
I ran into the same issue as @johnfmorton, and I broke up my Gemfile similarly. I received the same output from bundle install
but when I tried grunt serve
again, I got an issue similar to @mashcode.
$ grunt serve
Running "serve" task
Running "clean:server" (clean) task
>> 1 path cleaned.
Running "concurrent:server" (concurrent) task
>> Warning: There are more tasks than your concurrency limit. After this limit
>> is reached no further tasks will be run until the current tasks are
>> completed. You can adjust the limit in the concurrent task options
Running "sass:server" (sass) task
Done, without errors.
Execution Time (2015-08-01 00:38:05 UTC)
loading tasks 8.1s ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 100%
Total 8.1s
Running "copy:stageCss" (copy) task
Copied 1 files
Done, without errors.
Execution Time (2015-08-01 00:38:05 UTC)
loading tasks 8.1s ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 100%
Total 8.1s
Warning: Running "jekyll:server" (jekyll) task
>> Error: Command failed: /bin/sh -c jekyll -v
>> WARN: Unresolved specs during Gem::Specification.reset:
>> pygments.rb (~> 0.6.0)
>> redcarpet (~> 3.1)
>> jekyll-watch (~> 1.1)
>> WARN: Clearing out unresolved specs.
>> Please report a bug if this causes problems.
>> /Library/Ruby/Gems/2.0.0/gems/jekyll-2.5.3/bin/jekyll:21:in `block in <top (required)>': cannot load such file -- jekyll/version (LoadError)
>> from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.5/lib/mercenary.rb:18:in `program'
>> from /Library/Ruby/Gems/2.0.0/gems/jekyll-2.5.3/bin/jekyll:20:in `<top (required)>'
>> from /usr/bin/jekyll:23:in `load'
>> from /usr/bin/jekyll:23:in `<main>'
Warning: Please install Jekyll before running this task. Use --force to continue.
Aborted due to warnings.
Execution Time (2015-08-01 00:38:14 UTC)
loading tasks 1.7s ▇▇▇▇▇▇▇▇▇▇▇ 22%
jekyll:server 6.1s ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 78%
Total 7.8s Use --force to continue.
Aborted due to warnings.
Execution Time (2015-08-01 00:37:56 UTC)
loading tasks 8.2s ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 32%
concurrent:server 17.4s ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 68%
Total 25.7s