Gem has wrong version for Jekyll - ruby

I've installed latest Jekyll (3.3.1), but Gem/Ruby still thinks I'm on 3.2.1. E.g.:
$ jekyll --version
/Users/userx/.rvm/gems/ruby-2.4.0/gems/bundler-1.13.7/lib/bundler/resolver.rb:203:in `rescue in start': Bundler could not find compatible versions for gem "jekyll": (Bundler::VersionConflict)
In Gemfile:
jekyll (= 3.2.1)
minima was resolved to 2.1.0, which depends on
jekyll (~> 3.3)
from /Users/userx/.rvm/gems/ruby-2.4.0/gems/bundler-1.13.7/lib/bundler/resolver.rb:199:in `start'
from /Users/userx/.rvm/gems/ruby-2.4.0/gems/bundler-1.13.7/lib/bundler/resolver.rb:181:in `resolve'
from /Users/userx/.rvm/gems/ruby-2.4.0/gems/bundler-1.13.7/lib/bundler/definition.rb:250:in `resolve'
from /Users/userx/.rvm/gems/ruby-2.4.0/gems/bundler-1.13.7/lib/bundler/definition.rb:174:in `specs'
from /Users/userx/.rvm/gems/ruby-2.4.0/gems/bundler-1.13.7/lib/bundler/definition.rb:233:in `specs_for'
from /Users/userx/.rvm/gems/ruby-2.4.0/gems/bundler-1.13.7/lib/bundler/definition.rb:222:in `requested_specs'
from /Users/userx/.rvm/gems/ruby-2.4.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:118:in `block in definition_method'
from /Users/userx/.rvm/gems/ruby-2.4.0/gems/bundler-1.13.7/lib/bundler/runtime.rb:19:in `setup'
from /Users/userx/.rvm/gems/ruby-2.4.0/gems/bundler-1.13.7/lib/bundler.rb:99:in `setup'
from /Users/userx/.rvm/gems/ruby-2.4.0/gems/jekyll-3.3.1/lib/jekyll/plugin_manager.rb:36:in `require_from_bundler'
from /Users/userx/.rvm/gems/ruby-2.4.0/gems/jekyll-3.3.1/exe/jekyll:9:in `<top (required)>'
from /Users/userx/.rvm/gems/ruby-2.4.0/bin/jekyll:22:in `load'
from /Users/userx/.rvm/gems/ruby-2.4.0/bin/jekyll:22:in `<main>'
from /Users/userx/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:15:in `eval'
from /Users/userx/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:15:in `<main>'
The ~/.rvm/gems/ruby-2.4.0/gems/ folder contains folders jekyll-3.2.1 and jekyll-3.3.1. Running gem install jekyll returns Successfully installed jekyll-3.3.1. Any idea what the issue is here?

In your Gemfile change : gem 'jekyll', '3.2.1' for gem 'jekyll'.
Then : bundle update

Related

'Bundler could not find compatible versions for gem "jemoji"' when bundle exec jekyll serve

Actually I don't quite know what bundle nor jekyll is , but I am trying to execute bundle exec jekyll serve follow the guide https://github.com/apache/incubator-rocketmq-site , but fails.
I can't find google something similar like this so I post a question here.
$ bundle exec jekyll serve
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.15.3/lib/bundler/resolver.rb:21 8:in `rescue in start': Bundler could not find compatible versions for gem "jemo ji": (Bundler::VersionConflict)
In Gemfile:
minimal-mistakes-jekyll x64-mingw32 was resolved to 4.1.0, which depends on
jemoji (~> 0.7) x64-mingw32
Could not find gem 'jemoji (~> 0.7) x64-mingw32', which is required by gem 'mini mal-mistakes-jekyll x64-mingw32', in any of the sources.
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.15.3/lib/bundler/r esolver.rb:212:in `start'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.15.3/lib/bundler/r esolver.rb:191:in `resolve'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.15.3/lib/bundler/d efinition.rb:235:in `resolve'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.15.3/lib/bundler/d efinition.rb:159:in `specs'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.15.3/lib/bundler/d efinition.rb:218:in `specs_for'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.15.3/lib/bundler/d efinition.rb:207:in `requested_specs'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.15.3/lib/bundler/r untime.rb:109:in `block in definition_method'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.15.3/lib/bundler/r untime.rb:21:in `setup'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.15.3/lib/bundler.r b:101:in `setup'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/bundler-1.15.3/lib/bundler/s etup.rb:19:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54 :in `require'
from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54 :in `require'
How can I solve it?
Run bundle install alone first (step 4 in the linked README). This should install the necessary packages.
Then you can run bundle exec jekyll serve. The bundle exec means it will use those installed packages.

Jekyll fails to serve (Ruby incompatible library version)

When trying to run jekyll serve, it seems to build correctly (though with warnings that I haven't been able to resolve), but then fails to serve. jekyll build completes, but the resulting files are missing the compiled CSS.
Output from jekyll serve:
Ignoring ffi-1.9.10 because its extensions are not built. Try: gem pristine ffi --version 1.9.10
Ignoring curb-0.9.3 because its extensions are not built. Try: gem pristine curb --version 0.9.3
Ignoring executable-hooks-1.3.2 because its extensions are not built. Try: gem pristine executable-hooks --version 1.3.2
Ignoring ffi-1.9.10 because its extensions are not built. Try: gem pristine ffi --version 1.9.10
Ignoring gem-wrappers-1.2.7 because its extensions are not built. Try: gem pristine gem-wrappers --version 1.2.7
Ignoring json-1.8.2 because its extensions are not built. Try: gem pristine json --version 1.8.2
Ignoring thin-1.6.1 because its extensions are not built. Try: gem pristine thin --version 1.6.1
Configuration file: /home/jtebert/OwnCloud/Projects/Programming/python/AMS/mockup/_config.yml
Source: /home/jtebert/OwnCloud/Projects/Programming/python/AMS/mockup
Destination: /home/jtebert/OwnCloud/Projects/Programming/python/AMS/mockup/_site
Incremental build: disabled. Enable with --incremental
Generating...
done in 1.404 seconds.
/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:in `require': incompatible library version - /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/ffi-1.9.10/lib/ffi_c.so (LoadError)
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:in `require'
from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/ffi-1.9.10/lib/ffi.rb:6:in `rescue in <top (required)>'
from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/ffi-1.9.10/lib/ffi.rb:3:in `<top (required)>'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:in `require'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:in `require'
from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/rb-inotify-0.9.7/lib/rb-inotify/native.rb:1:in `<top (required)>'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/rb-inotify-0.9.7/lib/rb-inotify.rb:1:in `<top (required)>'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/listen-3.0.6/lib/listen/adapter/linux.rb:30:in `_configure'
from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/listen-3.0.6/lib/listen/adapter/base.rb:45:in `block in configure'
from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/listen-3.0.6/lib/listen/adapter/base.rb:40:in `each'
from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/listen-3.0.6/lib/listen/adapter/base.rb:40:in `configure'
from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/listen-3.0.6/lib/listen/adapter/base.rb:63:in `start'
from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/listen-3.0.6/lib/listen/backend.rb:26:in `start'
from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/listen-3.0.6/lib/listen/listener.rb:67:in `block in <class:Listener>'
from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/listen-3.0.6/lib/listen/fsm.rb:120:in `instance_eval'
from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/listen-3.0.6/lib/listen/fsm.rb:120:in `call'
from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/listen-3.0.6/lib/listen/fsm.rb:91:in `transition_with_callbacks!'
from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/listen-3.0.6/lib/listen/fsm.rb:57:in `transition'
from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/listen-3.0.6/lib/listen/listener.rb:90:in `start'
from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/jekyll-watch-1.3.1/lib/jekyll/watcher.rb:12:in `watch'
from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/jekyll-3.1.3/lib/jekyll/commands/build.rb:72:in `watch'
from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/jekyll-3.1.3/lib/jekyll/commands/build.rb:39:in `process'
from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/jekyll-3.1.3/lib/jekyll/commands/serve.rb:34:in `block (2 levels) in init_with_program'
from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `block in execute'
from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `each'
from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `execute'
from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/mercenary-0.3.5/lib/mercenary/program.rb:42:in `go'
from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/mercenary-0.3.5/lib/mercenary.rb:19:in `program'
from /home/jtebert/.rvm/gems/ruby-2.0.0-p643/gems/jekyll-3.1.3/bin/jekyll:13:in `<top (required)>'
from /usr/local/bin/jekyll:23:in `load'
from /usr/local/bin/jekyll:23:in `<main>'
When trying to start a Jekyll project, I did have to create a link of Ruby versions because it was looking for 'Ruby2.1', but I'm not sure if this is playing a role in the current problem: ln -s /usr/bin/ruby '/usr/bin/ruby2.1'.
According to my package manager, I've installed Ruby 2.3.0. But according to which ruby, I'm using 2.0.0 which it's getting from rvm: /home/xxxxxxx/.rvm/rubies/ruby-2.0.0-p643/bin/ruby. And as I mentioned before, Jekyll seems to want v2.1 for something. I'm guessing these conflicting versions are somehow causing the problem, but I don't know how to resolve it.
In my case I had to install the ffi library with gem:
gem install ffi
This error is probably caused by an older version of the library installed in the system. gem then installs the correct version for your project.
The problem for me seemed to be rvm (which I'm not sure how I ended up using). The solution was to remove rvm with rvm implode, then reinstall jekyll with gem install jekyll. Both the warnings and errors disappeared, and it is serving properly.

Compass --version error

When I run compass --version I am getting the following error:
/Users/AC-PCARDOSO-MAC/.rvm/gems/ruby-2.2.3#global/gems/bundler-1.10.6/lib/bundler/spec_set.rb:92:in `block in materialize': Could not find sprockets-3.5.1 in any of the sources (Bundler::GemNotFound)
from /Users/AC-PCARDOSO-MAC/.rvm/gems/ruby-2.2.3#global/gems/bundler-1.10.6/lib/bundler/spec_set.rb:85:in `map!'
from /Users/AC-PCARDOSO-MAC/.rvm/gems/ruby-2.2.3#global/gems/bundler-1.10.6/lib/bundler/spec_set.rb:85:in `materialize'
from /Users/AC-PCARDOSO-MAC/.rvm/gems/ruby-2.2.3#global/gems/bundler-1.10.6/lib/bundler/definition.rb:140:in `specs'
from /Users/AC-PCARDOSO-MAC/.rvm/gems/ruby-2.2.3#global/gems/bundler-1.10.6/lib/bundler/definition.rb:185:in `specs_for'
from /Users/AC-PCARDOSO-MAC/.rvm/gems/ruby-2.2.3#global/gems/bundler-1.10.6/lib/bundler/runtime.rb:13:in `setup'
from /Users/AC-PCARDOSO-MAC/.rvm/gems/ruby-2.2.3#global/gems/bundler-1.10.6/lib/bundler.rb:129:in `setup'
from /Users/AC-PCARDOSO-MAC/.rvm/gems/ruby-2.2.3#global/gems/bundler-1.10.6/lib/bundler.rb:134:in `require'
from /Users/AC-PCARDOSO-MAC/.rvm/gems/ruby-2.2.3/gems/compass-1.0.3/bin/compass:26:in `<top (required)>'
from /Users/AC-PCARDOSO-MAC/.rvm/gems/ruby-2.2.3/bin/compass:23:in `load'
from /Users/AC-PCARDOSO-MAC/.rvm/gems/ruby-2.2.3/bin/compass:23:in `<main>'
from /Users/AC-PCARDOSO-MAC/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `eval'
from /Users/AC-PCARDOSO-MAC/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `<main>'
Then I tried to install the gem that is missing using:
rvm #global do gem install sprockets
And
gem install sprockets
Even then I still getting the same error.
I tried to uninstall and reinstall SASS and COMPASS already, but it didn't work.
*I am using El Captain

Bundler could not find compatible versions for gem "tilt":

How to fix it?
Bundler could not find compatible versions for gem "tilt":
In Gemfile:
sprockets (>= 2.2.1) ruby depends on
tilt (!= 1.3.0, ~> 1.1) ruby
tilt (2.0.0)
(Bundler::VersionConflict)
/usr/local/lib/ruby/gems/1.9/gems/bundler-1.3.5/lib/bundler/resolver.rb:130:in `block in resolve'
/usr/local/lib/ruby/gems/1.9/gems/bundler-1.3.5/lib/bundler/resolver.rb:128:in `catch'
/usr/local/lib/ruby/gems/1.9/gems/bundler-1.3.5/lib/bundler/resolver.rb:128:in `resolve'
/usr/local/lib/ruby/gems/1.9/gems/bundler-1.3.5/lib/bundler/definition.rb:179:in `resolve'
/usr/local/lib/ruby/gems/1.9/gems/bundler-1.3.5/lib/bundler/definition.rb:114:in `specs'
/usr/local/lib/ruby/gems/1.9/gems/bundler-1.3.5/lib/bundler/definition.rb:159:in `specs_for'
/usr/local/lib/ruby/gems/1.9/gems/bundler-1.3.5/lib/bundler/definition.rb:148:in `requested_specs'
/usr/local/lib/ruby/gems/1.9/gems/bundler-1.3.5/lib/bundler/environment.rb:18:in `requested_specs'
/usr/local/lib/ruby/gems/1.9/gems/bundler-1.3.5/lib/bundler/runtime.rb:13:in `setup'
/usr/local/lib/ruby/gems/1.9/gems/bundler-1.3.5/lib/bundler.rb:120:in `setup'
/usr/local/lib/ruby/gems/1.9/gems/bundler-1.3.5/lib/bundler/setup.rb:17:in `<top (required)>'
/usr/local/lib/ruby/site_ruby/1.9/rubygems/custom_require.rb:60:in `require'
/usr/local/lib/ruby/site_ruby/1.9/rubygems/custom_require.rb:60:in `rescue in require'
/usr/local/lib/ruby/site_ruby/1.9/rubygems/custom_require.rb:35:in `require'
/usr/local/lib/ruby/gems/1.9/gems/passenger-4.0.29/lib/phusion_passenger/loader_shared_helpers.rb:219:in `block in run_load_path_setup_code'
/usr/local/lib/ruby/gems/1.9/gems/passenger-4.0.29/lib/phusion_passenger/loader_shared_helpers.rb:333:in `running_bundler'
/usr/local/lib/ruby/gems/1.9/gems/passenger-4.0.29/lib/phusion_passenger/loader_shared_helpers.rb:217:in `run_load_path_setup_code'
/usr/local/lib/ruby/gems/1.9/gems/passenger-4.0.29/helper-scripts/rack-preloader.rb:96:in `preload_app'
/usr/local/lib/ruby/gems/1.9/gems/passenger-4.0.29/helper-scripts/rack-preloader.rb:153:in `<module:App>'
/usr/local/lib/ruby/gems/1.9/gems/passenger-4.0.29/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
/usr/local/lib/ruby/gems/1.9/gems/passenger-4.0.29/helper-scripts/rack-preloader.rb:28:in `<main>'
I suppose you have in Gemfile
gem 'sprockets', '>= 2.2.1'
gem 'tilt', '2.0.0'
is tilt version 2.0.0 critical important? If it possible to downgrade it you can do following.
change in Gemfile
gem 'tilt', '1.4.1' # the previous version http://rubygems.org/gems/tilt
run
bundle update tilt
After this you can remove tilt version from Gemfile

Install passenger in CentOS with RVM and latest Ruby cause this error

I'm trying to install passenger-install-apache2-module but get this error:
[root#devserver redmine]# passenger-install-apache2-module
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/yaml.rb:56:in `<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
/usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.4/lib/bundler/resolver.rb:287:in `resolve': Could not find gem 'rails (= 3.2.6) ruby' in the gems available on this machine. (Bundler::GemNotFound)
from /usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.4/lib/bundler/resolver.rb:161:in `start'
from /usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.4/lib/bundler/resolver.rb:128:in `block in resolve'
from /usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.4/lib/bundler/resolver.rb:127:in `catch'
from /usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.4/lib/bundler/resolver.rb:127:in `resolve'
from /usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.4/lib/bundler/definition.rb:192:in `resolve'
from /usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.4/lib/bundler/definition.rb:127:in `specs'
from /usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.4/lib/bundler/environment.rb:27:in `specs'
from /usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/rubygems-bundler-1.0.3/lib/rubygems-bundler/noexec.rb:41:in `candidate?'
from /usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/rubygems-bundler-1.0.3/lib/rubygems-bundler/noexec.rb:60:in `setup'
from /usr/local/rvm/gems/ruby-1.9.3-p194#global/gems/rubygems-bundler-1.0.3/lib/rubygems-bundler/noexec.rb:75:in `<top (required)>'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:9:in `<main>'
What I miss?
looks like passenger is in your Gemfile, you can fix it in few ways:
run bundle install
run NOEXEC=0 passenger-install-apache2-module
It seems not to be possible to run passenger-install-apache2-module in the Rails project folder. Go one folder up and try again. -Íris

Resources