Question

I want to install Octopress, that works, but I can't use java highlighting because pygments.rb 0.3.x doesn't support it. So I tried to update to a newer one:

$ gem install -V pygments.rb

which fetches 0.5.4. Then I changed the Gemfile to

source "https://rubygems.org"

group :development do
  gem 'rake', '~> 10.2'
  gem 'jekyll', '~> 0.12'
  gem 'rdiscount', '~> 2.0.7'
  gem 'pygments.rb', '~> 0.5.4'
  gem 'RedCloth', '~> 4.2.9'
  gem 'haml', '~> 3.1.7'
  gem 'compass', '~> 0.12.2'
  gem 'sass', '~> 3.2'
  gem 'sass-globbing', '~> 1.0.0'
  gem 'rubypants', '~> 0.2.0'
  gem 'rb-fsevent', '~> 0.9'
  gem 'stringex', '~> 1.4.0'
  gem 'liquid', '~> 2.3.0'
  gem 'directory_watcher', '1.4.1'
end

gem 'sinatra', '~> 1.4.2'

and executed

$ bundle update pygments.rb

but I get

Fetching gem metadata from https://rubygems.org/........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "pygments.rb":
  In Gemfile:
    jekyll (~> 0.12) ruby depends on
      pygments.rb (~> 0.3.2) ruby

    pygments.rb (0.5.4)

How can I solve this? (I'm not familiar with ruby).

Was it helpful?

Solution

You've limited the maximum version of jekyll to 0.x, which limits your maximum version of pygments to 0.3.x. You can't go to pygments 0.5.x while your explicitly limited version of jekyll depends on a lower version of pygments.

You need to remove the limit on the jekyll version; replace

gem 'jekyll', '~> 0.12'

with

gem 'jekyll'

and then make sure that your program doesn't break after upgrading both jekyll and pygments.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top