Reputation: 484
Dears,
I am having a problem with ruby to get Redmine to work again. Basically this was working before somehow before, but now after some operations that I can not really get to the person who executed and messed up things the system is not working anymore. I have fixed a few other issues already, but this mysql2 problem scapes my skill set:
-------- The exception is as follows: -------
Could not find mysql2-0.3.21 in any of the sources (Bundler::GemNotFound)
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.16.5/lib/bundler/spec_set.rb:91:in `block in materialize'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.16.5/lib/bundler/spec_set.rb:85:in `map!'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.16.5/lib/bundler/spec_set.rb:85:in `materialize'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.16.5/lib/bundler/definition.rb:171:in `specs'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.16.5/lib/bundler/definition.rb:238:in `specs_for'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.16.5/lib/bundler/definition.rb:227:in `requested_specs'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.16.5/lib/bundler/runtime.rb:108:in `block in definition_method'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.16.5/lib/bundler/runtime.rb:20:in `setup'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.16.5/lib/bundler.rb:107:in `setup'
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.16.5/lib/bundler/setup.rb:20:in `<top (required)>'
/usr/local/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/usr/local/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/usr/local/lib/ruby/gems/2.4.0/gems/passenger-5.1.5/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:430:in `activate_gem'
/usr/local/lib/ruby/gems/2.4.0/gems/passenger-5.1.5/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:297:in `block in run_load_path_setup_code'
/usr/local/lib/ruby/gems/2.4.0/gems/passenger-5.1.5/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:435:in `running_bundler'
/usr/local/lib/ruby/gems/2.4.0/gems/passenger-5.1.5/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:296:in `run_load_path_setup_code'
/usr/local/lib/ruby/gems/2.4.0/gems/passenger-5.1.5/src/helper-scripts/rack-preloader.rb:100:in `preload_app'
/usr/local/lib/ruby/gems/2.4.0/gems/passenger-5.1.5/src/helper-scripts/rack-preloader.rb:156:in `<module:App>'
/usr/local/lib/ruby/gems/2.4.0/gems/passenger-5.1.5/src/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
/usr/local/lib/ruby/gems/2.4.0/gems/passenger-5.1.5/src/helper-scripts/rack-preloader.rb:29:in `<main>'
I have already installed mysql2 gem and the specific version asked for:
# ls -lah /usr/local/lib/ruby/gems/2.4.0/gems/mysql2-0.3.21
total 52K
drwxr-xr-x. 7 root root 4.0K Jun 27 2017 .
drwxr-xr-x. 97 root root 4.0K Jun 28 2017 ..
-rw-r--r--. 1 root root 1.1K Jun 27 2017 LICENSE
-rw-r--r--. 1 root root 20K Jun 27 2017 README.md
drwxr-xr-x. 2 root root 4.0K Jun 27 2017 examples
drwxr-xr-x. 3 root root 4.0K Jun 27 2017 ext
drwxr-xr-x. 3 root root 4.0K Jun 27 2017 lib
drwxr-xr-x. 4 root root 4.0K Jun 27 2017 spec
drwxr-xr-x. 2 root root 4.0K Jun 27 2017 support
All seemed to be fine for me:
# ruby -v
ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-linux]
gems:
# gem list
*** LOCAL GEMS ***
actionmailer (4.2.7.1, 3.2.14)
actionpack (4.2.7.1, 3.2.14)
actionpack-action_caching (1.2.0, 1.1.1)
actionpack-xml_parser (1.0.2)
actionview (4.2.7.1)
activejob (4.2.7.1)
activemodel (4.2.7.1, 3.2.14)
activerecord (4.2.7.1, 3.2.14)
activeresource (3.2.14)
activesupport (4.2.7.1, 3.2.14)
addressable (2.5.2, 2.5.1, 2.5.0)
afm (0.2.0)
arel (6.0.4, 6.0.3, 3.0.3, 3.0.2)
Ascii85 (1.0.2)
authlogic (3.8.0, 3.3.0)
bigdecimal (default: 1.2.6)
blitz (0.1.30)
bootstrap-sass (2.3.2.2)
builder (3.2.3, 3.2.2, 3.0.4)
bundler (1.16.5, default: 1.16.2, 1.15.1)
cancan (1.6.10)
capybara (2.14.4, 2.1.0)
childprocess (0.7.1)
chosen-rails (1.0.0)
chunky_png (1.2.8)
cocaine (0.3.2)
coderay (1.1.1)
coffee-rails (3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.6.3)
commonjs (0.2.6)
compass (0.12.2)
compass-rails (1.0.3)
concurrent-ruby (1.0.5, 1.0.4)
couchrest (1.0.1)
css_parser (1.5.0, 1.4.7)
diff-lcs (1.2.4)
docile (1.1.5)
erubis (2.7.0)
execjs (1.4.0)
expectr (0.9.1)
factory_girl (4.2.0)
factory_girl_rails (4.2.1)
faraday (0.9.0)
fcgi (0.9.2.1)
ffi (1.9.25, 1.9.18)
ffi-compiler (1.0.1)
fssm (0.2.10)
globalid (0.4.0, 0.3.7)
hashery (2.1.0)
hashie (1.2.0)
hexdump (0.2.3)
hike (1.2.3)
htmlentities (4.3.4, 4.3.1)
httpauth (0.2.1)
i18n (0.9.5, 0.8.4, 0.7.0, 0.6.5)
io-console (default: 0.4.3)
journey (1.0.4)
jquery-rails (3.1.4, 3.0.4)
jquery-ui-rails (4.0.4)
json (2.1.0, 1.8.6, 1.8.3, default: 1.8.1)
json_pure (1.8.0)
jwt (0.1.13)
kaminari (0.14.1)
kgio (2.9.2)
less (2.3.2)
less-rails (2.3.3)
libv8 (3.11.8.17 x86_64-linux)
loofah (2.0.3)
mail (2.6.6, 2.6.4, 2.5.5, 2.5.4)
metaclass (0.0.4)
mime-types (3.1, 1.25.1, 1.24)
mime-types-data (3.2016.0521)
mimemagic (0.3.2)
mini_portile (0.5.1)
mini_portile2 (2.2.0, 2.1.0)
minitest (5.10.2, 5.10.1, 5.4.3)
mocha (1.2.1)
multi_json (1.13.1, 1.12.1, 1.7.9)
multipart-post (2.0.0)
mysql (2.9.1)
net-ldap (0.12.1)
nokogiri (1.8.0, 1.6.8.1, 1.6.0)
passenger (5.3.4)
polyglot (0.3.5, 0.3.3)
power_assert (0.2.2)
protected_attributes (1.1.4, 1.1.3)
psych (default: 2.0.8)
public_suffix (3.0.3, 2.0.5, 2.0.4)
rack (1.6.8, 1.6.5, 1.4.7, 1.4.5)
rack-cache (1.8.0, 1.2)
rack-openid (1.4.2)
rack-ssl (1.3.3)
rack-test (0.6.3, 0.6.2)
rails (4.2.7.1)
rails-deprecated_sanitizer (1.0.3)
rails-dom-testing (1.0.8, 1.0.7)
rails-html-sanitizer (1.0.3)
railties (4.2.7.1, 3.2.14)
rake (12.3.1, 12.0.0, default: 10.4.2, 10.1.0)
rbpdf (1.19.2, 1.19.0)
rbpdf-font (1.19.1, 1.19.0)
rdoc (5.1.0, default: 4.2.0, 3.12.2)
redcarpet (3.3.4)
request_store (1.4.1, 1.0.5)
rest-client (1.6.7)
rmagick (2.16.0)
roadie (3.2.2, 3.2.0)
roadie-rails (1.2.1, 1.1.1)
ruby-openid (2.3.0)
rubygems-update (2.7.7)
rubyzip (1.2.1)
sass (3.2.10)
sass-rails (3.2.6)
scrypt (3.0.5)
selenium-webdriver (3.4.3)
simplecov (0.9.2)
simplecov-html (0.9.0)
sprockets (3.7.1, 2.2.3, 2.2.2)
sprockets-rails (3.2.0)
term-ansicolor (1.0.5)
test-unit (3.0.8)
thor (0.19.4, 0.18.1)
thread_safe (0.3.6, 0.3.5)
tilt (1.4.1)
treetop (1.4.15)
tzinfo (1.2.3, 1.2.2, 0.3.54, 0.3.37)
xpath (2.1.0, 2.0.0)
yard (0.9.9)
Why would this be happening?
Upvotes: 0
Views: 534
Reputation: 2781
Your installation looks messy. Take a look:
Call stack shows gems from different Ruby versions (2.2 and 2.4):
/usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.16.5
...
/usr/local/lib/ruby/gems/2.4.0/gems/passenger-5.1.5
Mysql2
gem is installed for Ruby 2.4:
/usr/local/lib/ruby/gems/2.4.0/gems/mysql2-0.3.21
But your current version of Ruby is 2.2 (2.2.4p230
to be correct). And for this version mysql2
gem is not present; only mysql
is available:
mysql (2.9.1)
I would recommend uninstalling rubies you don't use along with gems, keep one which you prefer, and for that version install all required gems from scratch. Or, better, use rvm
or other Ruby manager along with gemsets.
Upvotes: 1