Ruby 2.5 activesupport ubuntu conflicts with i18n - ruby

I wanna run a simple script with made on Ruby, when i try to run it i get the next error.
Traceback (most recent call last):
6: from thread.py:6:in `<main>'
5: from /root/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:39:in `require'
4: from /root/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
3: from /root/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems.rb:217:in `try_activate'
2: from /root/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems.rb:224:in `rescue in try_activate'
1: from /root/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/specification.rb:1437:in `activate'
/root/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/specification.rb:2324:in `raise_if_conflicts': Unable to activate activesupport-5.1.5, because i18n-1.0.0 conflicts with i18n (~> 0.7) (Gem::ConflictError)
My Ruby version is:
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-linux]
Am i missing something?

The problem seems to be that the 1.0.0 version if i18n was just released, but activesupport is not compatible with this version (~> 0.7).
One solution is to remove 1.0.0 system-wide, and reinstall 0.9.5 instead, which is the latest version before 1.0.0:
gem uninstall i18n --all --force
gem install i18n --version 0.9.5

Related

Ruby bundle install fail

My system is macOS m1 chip. I'm using ruby to bundle install from gemfile, but it seems like the llhttp-ffi gem has conflict, I'm not really sure about the problem. So below is the output when I tried bundle install. I've tried to search about Failed to build gem native extension or just gem install ffi, both have not worked.
$ bundle install
Fetching gem metadata from https://rubygems.org/........
Resolving dependencies...
Using rake 13.0.6
Using public_suffix 4.0.6
Using dry-inflector 0.2.1
Using ast 2.4.2
Using ice_nine 0.11.2
Using ffi 1.15.4
Using thor 1.1.0
Using path_expander 1.1.0
Using sexp_processor 4.15.3
Using hashdiff 1.0.1
Using http-form_data 2.3.0
Using kwalify 0.7.2
Using rb-fsevent 0.11.0
Using method_source 1.0.0
Using minitest 5.14.4
Using nio4r 2.5.8
Using parallel 1.21.0
Using rack 2.2.3
Using rainbow 3.0.0
Using regexp_parser 2.1.1
Using ruby-progressbar 1.11.0
Using unicode-display_width 2.1.0
Using sequel 5.50.0
Using simplecov-html 0.12.3
Using simplecov_json_formatter 0.1.3
Using temple 0.8.2
Using tilt 2.0.10
Using bundler 2.2.22
Using vcr 6.0.0
Using addressable 2.8.0
Using ffi-compiler 1.0.1
Using figaro 1.2.0
Using ruby_parser 3.17.0
Using rb-inotify 0.10.1
Using minitest-rg 5.2.0
Using parser 3.0.2.0
Using puma 5.5.2
Using roda 3.49.0
Using slim 4.1.0
Using coderay 1.1.3
Using concurrent-ruby 1.1.9
Using rexml 3.2.5
Using docile 1.4.0
Using unf_ext 0.0.8
Fetching sqlite3 1.4.2
Using crack 0.4.5
Using unf 0.1.4
Using dry-core 0.7.1
Using flog 4.6.4
Fetching llhttp-ffi 0.4.0
Using listen 3.7.0
Using pry 0.14.1
Using reek 6.0.6
Using rubocop-ast 1.12.0
Using simplecov 0.21.2
Using domain_name 0.5.20190701
Using dry-configurable 0.13.0
Using dry-logic 1.2.0
Using rerun 0.13.1
Using rubocop 1.22.1
Using webmock 3.14.0
Using dry-container 0.9.0
Using http-cookie 1.0.4
Using dry-types 1.5.1
Using dry-struct 1.4.0
Installing llhttp-ffi 0.4.0 with native extensions
Installing sqlite3 1.4.2 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /opt/homebrew/lib/ruby/gems/3.0.0/gems/llhttp-ffi-0.4.0/ext
/opt/homebrew/opt/ruby/bin/ruby -I/opt/homebrew/Cellar/ruby/3.0.2_1/lib/ruby/3.0.0 -rrubygems /opt/homebrew/lib/ruby/gems/3.0.0/gems/rake-13.0.6/exe/rake
RUBYARCHDIR\=/opt/homebrew/lib/ruby/gems/3.0.0/extensions/arm64-darwin-20/3.0.0/llhttp-ffi-0.4.0
RUBYLIBDIR\=/opt/homebrew/lib/ruby/gems/3.0.0/extensions/arm64-darwin-20/3.0.0/llhttp-ffi-0.4.0
rake aborted!
LoadError: dlopen(/opt/homebrew/lib/ruby/gems/3.0.0/gems/ffi-1.15.4/lib/ffi_c.bundle, 9): no suitable image found. Did find:
/opt/homebrew/lib/ruby/gems/3.0.0/gems/ffi-1.15.4/lib/ffi_c.bundle: mach-o, but wrong architecture
/opt/homebrew/lib/ruby/gems/3.0.0/gems/ffi-1.15.4/lib/ffi_c.bundle: mach-o, but wrong architecture - /opt/homebrew/lib/ruby/gems/3.0.0/gems/ffi-1.15.4/lib/ffi_c.bundle
<internal:/opt/homebrew/Cellar/ruby/3.0.2_1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
<internal:/opt/homebrew/Cellar/ruby/3.0.2_1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
/opt/homebrew/lib/ruby/gems/3.0.0/gems/ffi-1.15.4/lib/ffi.rb:5:in `rescue in <top (required)>'
/opt/homebrew/lib/ruby/gems/3.0.0/gems/ffi-1.15.4/lib/ffi.rb:2:in `<top (required)>'
<internal:/opt/homebrew/Cellar/ruby/3.0.2_1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
<internal:/opt/homebrew/Cellar/ruby/3.0.2_1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
/opt/homebrew/lib/ruby/gems/3.0.0/gems/ffi-compiler-1.0.1/lib/ffi-compiler/compile_task.rb:4:in `<top (required)>'
<internal:/opt/homebrew/Cellar/ruby/3.0.2_1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:160:in `require'
<internal:/opt/homebrew/Cellar/ruby/3.0.2_1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:160:in `rescue in require'
<internal:/opt/homebrew/Cellar/ruby/3.0.2_1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:149:in `require'
/opt/homebrew/lib/ruby/gems/3.0.0/gems/llhttp-ffi-0.4.0/ext/Rakefile:3:in `<top (required)>'
/opt/homebrew/lib/ruby/gems/3.0.0/gems/rake-13.0.6/exe/rake:27:in `<main>'
Caused by:
LoadError: cannot load such file -- 3.0/ffi_c
<internal:/opt/homebrew/Cellar/ruby/3.0.2_1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
<internal:/opt/homebrew/Cellar/ruby/3.0.2_1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
/opt/homebrew/lib/ruby/gems/3.0.0/gems/ffi-1.15.4/lib/ffi.rb:3:in `<top (required)>'
<internal:/opt/homebrew/Cellar/ruby/3.0.2_1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
<internal:/opt/homebrew/Cellar/ruby/3.0.2_1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
/opt/homebrew/lib/ruby/gems/3.0.0/gems/ffi-compiler-1.0.1/lib/ffi-compiler/compile_task.rb:4:in `<top (required)>'
<internal:/opt/homebrew/Cellar/ruby/3.0.2_1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:160:in `require'
<internal:/opt/homebrew/Cellar/ruby/3.0.2_1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:160:in `rescue in require'
<internal:/opt/homebrew/Cellar/ruby/3.0.2_1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:149:in `require'
/opt/homebrew/lib/ruby/gems/3.0.0/gems/llhttp-ffi-0.4.0/ext/Rakefile:3:in `<top (required)>'
/opt/homebrew/lib/ruby/gems/3.0.0/gems/rake-13.0.6/exe/rake:27:in `<main>'
Caused by:
LoadError: cannot load such file -- ffi-compiler/compile_task
<internal:/opt/homebrew/Cellar/ruby/3.0.2_1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
<internal:/opt/homebrew/Cellar/ruby/3.0.2_1/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
/opt/homebrew/lib/ruby/gems/3.0.0/gems/llhttp-ffi-0.4.0/ext/Rakefile:3:in `<top (required)>'
/opt/homebrew/lib/ruby/gems/3.0.0/gems/rake-13.0.6/exe/rake:27:in `<main>'
(See full trace by running task with --trace)
rake failed, exit code 1
Gem files will remain installed in /opt/homebrew/lib/ruby/gems/3.0.0/gems/llhttp-ffi-0.4.0 for inspection.
Results logged to /opt/homebrew/lib/ruby/gems/3.0.0/extensions/arm64-darwin-20/3.0.0/llhttp-ffi-0.4.0/gem_make.out
An error occurred while installing llhttp-ffi (0.4.0), and Bundler cannot continue.
Make sure that `gem install llhttp-ffi -v '0.4.0' --source 'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
http was resolved to 5.0.4, which depends on
llhttp-ffi
I was seeing the same problem while updating Ruby from 2.7.5 to 2.7.6. Big Sur 11.6.1, Intel i7, fwiw.
After many confusing errors and failed solutions, I deleted my entire bundle/vendor directory and bundled anew. This got me a clean bundle install.
I'm not sure what the conflict was, but a clean slate fixed it.

jekyll serve --livereload fails with "Unable to load the EventMachine C extension; To use the pure-ruby reactor, require 'em/pure_ruby'"

The solution to this issue given on rubyinstaller does not work for me
https://github.com/oneclick/rubyinstaller2/issues/96
gem uninstall eventmachine
gem install eventmachine --platform ruby
Any thoughts?
PS D:\wiecejwolnosci> jekyll new site2 .
Running bundle install in D:/wiecejwolnosci/site2...
Bundler: Fetching gem metadata from https://rubygems.org/..........
Bundler: Resolving dependencies...
Bundler: Using public_suffix 4.0.6
Bundler: Using addressable 2.7.0
Bundler: Using bundler 2.2.12
Bundler: Using colorator 1.1.0
Bundler: Using concurrent-ruby 1.1.8
Bundler: Using eventmachine 1.2.7 (x64-mingw32)
Bundler: Using http_parser.rb 0.6.0
Bundler: Using em-websocket 0.5.2
Bundler: Using ffi 1.14.2 (x64-mingw32)
Bundler: Using forwardable-extended 2.6.0
Bundler: Using jekyll-sass-converter 2.1.0
Bundler: Using rb-fsevent 0.10.4
Bundler: Using rb-inotify 0.10.1
Bundler: Using listen 3.4.1
Bundler: Using jekyll-watch 2.2.1
Bundler: Using rexml 3.2.4
Bundler: Using kramdown 2.3.0
Bundler: Using kramdown-parser-gfm 1.1.0
Bundler: Using liquid 4.0.3
Bundler: Using mercenary 0.4.0
Bundler: Using pathutil 0.16.2
Bundler: Using rouge 3.26.0
Bundler: Using safe_yaml 1.0.5
Bundler: Using unicode-display_width 1.7.0
Bundler: Using terminal-table 2.0.0
Bundler: Using jekyll 4.2.0
Bundler: Using jekyll-feed 0.15.1
Bundler: Using minima 2.5.1
Bundler: Using thread_safe 0.3.6
Bundler: Using tzinfo 1.2.9
Bundler: Using tzinfo-data 1.2021.1
Bundler: Using wdm 0.1.1
Bundler: Bundle complete! 6 Gemfile dependencies, 35 gems now installed.
Bundler: Use `bundle info [gemname]` to see where a bundled gem is installed.
New jekyll site installed in D:/wiecejwolnosci/site2.
PS D:\wiecejwolnosci> cd .\site2\
PS D:\wiecejwolnosci\site2> ls
Directory: D:\wiecejwolnosci\site2
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 05/03/2021 14:37 _posts
-a---- 05/03/2021 14:37 56 .gitignore
-a---- 05/03/2021 14:37 419 404.html
-a---- 05/03/2021 14:37 539 about.markdown
-a---- 05/03/2021 14:37 1155 Gemfile
-a---- 05/03/2021 14:38 2038 Gemfile.lock
-a---- 05/03/2021 14:37 175 index.markdown
-a---- 05/03/2021 14:37 2080 _config.yml
PS D:\wiecejwolnosci\site2> bundler install
Using public_suffix 4.0.6
Using addressable 2.7.0
Using bundler 2.2.12
Using colorator 1.1.0
Using concurrent-ruby 1.1.8
Using eventmachine 1.2.7 (x64-mingw32)
Using http_parser.rb 0.6.0
Using em-websocket 0.5.2
Using ffi 1.14.2 (x64-mingw32)
Using i18n 1.8.9
Using sassc 2.4.0 (x64-mingw32)
Using jekyll-sass-converter 2.1.0
Using rb-fsevent 0.10.4
Using rb-inotify 0.10.1
Using listen 3.4.1
Using jekyll-watch 2.2.1
Using rexml 3.2.4
Using kramdown 2.3.0
Using kramdown-parser-gfm 1.1.0
Using liquid 4.0.3
Using mercenary 0.4.0
Using pathutil 0.16.2
Using rouge 3.26.0
Using safe_yaml 1.0.5
Using unicode-display_width 1.7.0
Using terminal-table 2.0.0
Using jekyll 4.2.0
Using jekyll-feed 0.15.1
Using jekyll-seo-tag 2.7.1
Using minima 2.5.1
Using thread_safe 0.3.6
Using tzinfo 1.2.9
Using tzinfo-data 1.2021.1
Using wdm 0.1.1
Bundle complete! 6 Gemfile dependencies, 35 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
PS D:\wiecejwolnosci\site2> bundler exec jekyll serve --livereload
Configuration file: D:/wiecejwolnosci/site2/_config.yml
Source: D:/wiecejwolnosci/site2
Destination: D:/wiecejwolnosci/site2/_site
Incremental build: disabled. Enable with --incremental
Generating...
Jekyll Feed: Generating feed for posts
done in 1.494 seconds.
Auto-regeneration: enabled for 'D:/wiecejwolnosci/site2'
Unable to load the EventMachine C extension; To use the pure-ruby reactor, require 'em/pure_ruby'
------------------------------------------------
Jekyll 4.2.0 Please append `--trace` to the `serve` command
for any additional information or backtrace.
------------------------------------------------
Traceback (most recent call last):
22: from C:/Ruby27-x64/bin/jekyll:23:in `<main>'
21: from C:/Ruby27-x64/bin/jekyll:23:in `load'
20: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/exe/jekyll:15:in `<top (required)>'
19: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
18: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
17: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
16: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
15: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
14: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
13: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
12: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `each'
11: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
10: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:98:in `process'
9: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:143:in `register_reload_hooks'
8: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:143:in `require_relative'
7: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve/live_reload_reactor.rb:3:in `<top (required)>'
6: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve/live_reload_reactor.rb:3:in `require'
5: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/em-websocket-0.5.2/lib/em-websocket.rb:3:in `<top (required)>'
4: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/em-websocket-0.5.2/lib/em-websocket.rb:3:in `require'
3: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/eventmachine-1.2.7-x64-mingw32/lib/eventmachine.rb:8:in `<top (required)>'
2: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/eventmachine-1.2.7-x64-mingw32/lib/eventmachine.rb:8:in `require'
1: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/eventmachine-1.2.7-x64-mingw32/lib/rubyeventmachine.rb:2:in `<top (required)>'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/eventmachine-1.2.7-x64-mingw32/lib/rubyeventmachine.rb:2:in `require': cannot load such file -- 2.7/rubyeventmachine (LoadError)
EventMachine is severely undermaintained. I had a lot of issues with it while writing CI jobs. The best way to deal with it is to use a Git version. In your Gemfile you will need to add:
gem 'eventmachine', github: 'eventmachine/eventmachine'
Then you will need to bundle install.
For those who just want to make Jekyll live reload: Use a browser extension instead.
Example:
Install blaise-io/live-reload. (Chrome / Firefox / Edge)
Serve your site (jekyll serve/bundler exec jekyll serve) and open in your browser.
Click the extension's button (in browser's bar), click “Create a new reload rule…”, then a small window would appear.
In “Source file URLs”, enter your Jekyll generated files' permalinks (eg. http://localhost:4000/assets/css/*.css).
(In other words, .html & .css rather than .md & .scss, http:// rather than file:///. These files maps to your _site/ folder.)
Scroll down, “Save reload rule”. Have fun Jekylling.
(Warn: I am new to ruby, so below may be wrong.)
In fact, this is not a Jekyll issue. Search for Ruby if you want.
You can check this in Interactive Ruby.
Open a terminal, enter irb, write require 'eventmachine', and a similar issue would happen.
PS C:\Users\…❯ irb
irb(main):001:0> require 'eventmachine'
Unable to load the EventMachine C extension; To use the pure-ruby reactor, require 'em/pure_ruby'
……
(If you get stuck in Interactive Ruby, Ctrl+C, enter exit/quit.)
Jeyll's --livereload (live_reload_reactor.rb or sth.) (indirectly) uses EventMachine, which goes wrong.
EventMachine is implemented in 2 ways:
C as an extension: Default but not working. Sorry I don't know how to fix.
(Reinstall may work, try if you haven't. Good luck :-)
Ruby: Not default. Some works, some (including me) don't.
You can have a try by adding require 'em/pure_ruby' as the first line of where-you-install-ruby/Ruby○○-x○○/lib/ruby/gems/○.○.○/gems/eventmachine-○.○.○-x○○-mingw32/lib/eventmachine.rb. (“○” are numbers depends on versions)
If you uses Ruby 3.x, you may met another issue (as the comments there saying): Ruby 3.x removes SortedSet (pure_ruby.rb writes #timers = SortedSet.new # []) and recommends sorted_set for an alternative, though Ruby 3.x autoload :SortedSet, "#{__dir__}/set/sorted_set". I install and require 'sorted_set', but other issues appear.
Conclusion: Jeyllers' quick solution is using a browser extension.

How to fix Gem Conflict Error with 2 versions of a dependency without bundler

I am making a discord bot in ruby and am using the rspotify gem. rspotify has rest-client v2.0.2 as a dependency while the library discordrb has rest-client v2.1.0.rc1 as a dependency. When I try to run my code I get a Gem Conflict Error as both versions cannot be used. Is there any way to use both versions of a gem or somehow manually update rspotify to use rest-client 2.1.0.rc1?
I can upload a gem dependency list for all my gems but its pretty long. Any help would be appreciated.
Also, I am not using bundler, instead I have installed the gems manually via gem install <gem_name>.
Errors From Console:
Traceback (most recent call last):
2: from start-bot.rb:15:in `<main>'
1: from /usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- rspotify (LoadError)
5: from start-bot.rb:15:in `<main>'
4: from /usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:34:in `require'
3: from /usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:123:in `rescue in require'
2: from /usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/rubygems.rb:217:in `try_activate'
1: from /usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/rubygems/specification.rb:1418:in `activate'
/usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/rubygems/specification.rb:2302:in `raise_if_conflicts': Unable to activate rspotify-2.6.0, because rest-client-2.1.0.rc1 conflicts with rest-client (~> 2.0.2) (Gem::ConflictError)
6: from start-bot.rb:15:in `<main>'
5: from /usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:34:in `require'
4: from /usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:123:in `rescue in require'
3: from /usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/rubygems.rb:216:in `try_activate'
2: from /usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/rubygems.rb:223:in `rescue in try_activate'
1: from /usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/rubygems/specification.rb:1418:in `activate'
/usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/rubygems/specification.rb:2302:in `raise_if_conflicts': Unable to activate rspotify-2.6.0, because rest-client-2.1.0.rc1 conflicts with rest-client (~> 2.0.2) (Gem::ConflictError)

Every chef commands gets error (Mac OS X)

It looks like following:
$chef-client --version
/opt/chef/embedded/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:774:in `block in activate_dependencies': can't satisfy 'mime-types (~> 1.16)', already activated 'mime-types-2.0' (Gem::LoadError)
from /opt/chef/embedded/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:766:in `each'
from /opt/chef/embedded/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:766:in `activate_dependencies'
from /opt/chef/embedded/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:750:in `activate'
from /opt/chef/embedded/lib/ruby/site_ruby/1.9.1/rubygems.rb:1232:in `gem'
from /opt/chef/embedded/bin/chef-client:22:in `'
It is mean that I should reinstall ruby?or updated it? What kinds of commands should be used?
I guess you installed Chef through rubygems. It requires mime-types ~> 1.16, but you have 2.0 installed. You should uninstall it and install the right version.
gem uninstall mime-types
gem install mime-types -v 1.16

Could not find rake-0.8.7 in any of the sources (Bundler::GemNotFound)

I am using Ruby 1.8.7 and Rails 2.3.5 version . When I try to start the server it throws the below error.
When I list the gem its shows the rake there but of different version
actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
bundler (1.1.3)
fattr (2.2.1)
git (1.2.5)
postgres-pr (0.6.3)
rack (1.0.1)
rails (2.3.5)
rake (0.9.2.2)
rush (0.6.8)
session (3.1.0)
Please help me to figure out this issue .
D:/ruby/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/spec_set.rb:90:in `materialize': Could not find rake-0.8.7 in any of the sources (Bundler::GemNotFound)
from D:/ruby/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/spec_set.rb:83:in `map!'
from D:/ruby/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/spec_set.rb:83:in `materialize'
from D:/ruby/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/definition.rb:127:in `specs'
from D:/ruby/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/definition.rb:172:in `specs_for'
from D:/ruby/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/runtime.rb:11:in `setup'
from D:/ruby/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler.rb:114:in `setup'
from D:/ruby/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler.rb:119:in `require'
from D:/safecellweb/config/boot.rb:116:in `load_gems'
from D:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:164:in `process'
from D:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `send'
from D:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `run'
from D:/safecellweb/config/environment.rb:10
from D:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from D:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from D:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
from D:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
from D:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
from D:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/commands/server.rb:84
from D:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from D:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from script/server:4
Actually your rake version is 0.9.2
While your app required 0.8.7
so first uninstall rake 0.9.2 by this command
gem uninstall rake -v=0.9.2
then install rake 0.8.7 by this command
gem install rake -v=0.8.7
Hope your issue will be solve........
Run these commands the problem will fix
step 1:install rake gem install rake -v '0.8.7'
step 2: install bundler gem install bundler
step 3: bundle install
it will fix the issue..
Even I faced the same problem while running an application using RubyMine.
Steps taken by me:
1) I installed new Ruby on my machine.
2) Changed the path of Ruby in environment variables.
3) Changed the path of Ruby in RubyMine using following steps:-
a) Click File -> Settings -> Ruby SDK and Gems
4) Then ran bundle install

Resources