Free set up your own blog

This blog earliest reference to the creation of others. See Jekyll build personal blog , but also encountered some problems, record it.

Installation of jekyll

Because the default built-in Ruby using the mac, the install gem, the write path to the system directory, does not have permission. So according to this article under Mac OS X uses two pit Ruby Gem is a Ruby reinstalled.

Problems start when jekyll

After jekyll server error:

/usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.2/lib/bundler/runtime.rb:313:in `check_for_activated_spec!': You have already activated jekyll 3.8.3, but your Gemfile requires jekyll 3.5.2. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)

This error, a modified version of a manual value of the component / vim Gemfile.lock corresponding, until the emergence of a new error

Dependency Error: Yikes! It looks like you don't have jekyll-watch or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. The full error message from Ruby is: 'cannot  大专栏  免费搭建自己的博客load such file -- ruby_dep/warning' If you run into trouble, you can find helpful resources at https://jekyllrb.com/help/!

Try to scheme gem list jekyll-watch gem uninstall jekyll-watch -v 1.0.0 delete the extra module version, but still can not run.

Follow-up was last modified Gemfile.lock fail, causing the file is unreadable, the following error appears:

Your lockfile is unreadable. Run `rm Gemfile.lock` and then `bundle install` to generate a new lockfile. (Bundler::LockfileError)

After performing bundle install available. I suspect the first time rm Gemfile.lock then bundle install can be used.

Follow-up configuration items

  • Baidu statistics apply for an account, look at the code, inside there is a id. Baidu id _config.yml configuration to configuration items.
  • Google tracking above, the configuration application tracking ID to ga.id.
  • In appreciation of the collection code / image / payimg / directory.

Reproduced please specify: Zhang Hao's blog >> Click to read the original text

Guess you like

Origin www.cnblogs.com/lijianming180/p/12026655.html