Your Ruby version is 2.4.4, but your Gemfile specified 3.0.4

Infos:

  • Used Zammad version: 5.1
  • Used Zammad installation type: source
  • Operating system: Ubuntu 20.04.5 LTS
  • Browser + version: Firefox 106.05

Expected behavior: ruby -v in my home folder is 3.1.2 but in my opt/ directory it is 2.4.4

Actual behavior: Using the update instructions on the zammad site, When I use this command :

bundle install --without test development postgres,
I get this

[DEPRECATED] The --without flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use bundle config set --local without 'test development postgres', and stop using this flag
and Your Ruby version is 2.4.4, but your Gemfile specified 3.0.4

I’m new to Bash and am just learning as I go , I have installed rbenv : rbenv install 3.1.2 and used rbenv global 3.1.2 to set the global ruby version if I understand right.

Steps to reproduce the behavior:bundle install --without test development postgres,

  • Could I get some pointers or resource to resolve this issue?

If you are sure, that you are using bash, please have a look if you have an entry in ~/.bash_profile or ~/.bashrc that looks like

eval "$(rbenv init -)"

Yes I use bash, When I cat ~/.bash_profile I get the following:

[[ -s “$HOME/.profile” ]] && source “$HOME/.profile” # Load the default .profile

[[ -s “$HOME/.rvm/scripts/rvm” ]] && source “$HOME/.rvm/scripts/rvm” # Load RVM into a shell session as a function

This is at the ~/ directory when on the zammad user, Its diffrent with my root user ,
I know i’m not clear but i’m rather new to Ubuntu.

Any help would be appreciated

So following the dependency installation part of the installation documentation (which the update documentation suggest to do) does not work for you?

https://docs.zammad.org/en/latest/install/source.html#source-dependency-installation

I was using these instructions to attempt to update
https://docs.zammad.org/en/latest/install/update.html#source-update

I got the error at this : bundle install --without test development postgres

I will follow the link you posted and attempt a ruby installation with RVM,

If you’d post an actual error message people might be able to help you.

Don’t mean to be rude but I get the feeling that a source code installation is not the perfect fit for you. Package installations are much easier to handle

No offense taken as I am a noob to bash/Linux,
I believe I have installed zammad( I was performing an update from 2.9 to 5.0) but the issue / error is when I try to run this section of the update instructions to update the database
su - zammad
$ rake db:migrate

I get the error [Your Ruby version is 2.4.4, but your Gemfile specified 3.0.4

I tried to use rbenv to upgrade ruby but after setting the ruby version with rbenv local 3.0.4
The problem is when i go to the opt/zammad directory the zammad user shows the ruby version as 2…4.4.
Let me know if I am describing the issue properly. Cheers.

Obviously you have rbenv and rvm installed together on the same system. This is really a bad idea. Both are installing ruby their own way and injecting the ruby binaries to your path. Focus on using one of them (I suggest rbenv).

I’d suggest the official documented way, especially for people that are unsure what happens exactly.


Any way, another option -that may help- would be to migrate to a package installation by running the backup and restore process: Backup and Restore — Zammad documentation

At least the dependency handling ruby wise will then no longer be an issue to you if that helps.

I went with RVM and ruby is now on version 3.0.4,
Now when I try rake db:migrate
I have a new error :

Could not find rails-6.1.7, activerecord-import-1.4.0, activerecord-session_store-2.0.0, bootsnap-1.12.0, composite_primary_keys-13.0.3, json-2.6.2, puma-4.3.12, unicorn-6.1.0, activerecord-nulldb-adapter-0.8.0, mysql2-0.5.4, daemons-1.4.1, delayed_job_active_record-4.1.7, em-websocket-0.5.3, eventmachine-1.2.7, hiredis-0.6.3, redis-4.6.0, argon2-2.1.1, pundit-2.2.0, graphql-2.0.9, graphql-batch-0.5.1, rszr-1.2.1, dalli-3.2.2, vite_rails-3.0.10, execjs-2.8.1, coffee-rails-5.0.0, eco-1.0.0, sassc-rails-2.1.2, sprockets-3.7.2, uglifier-4.2.0, autoprefixer-rails-10.4.7.0, doorkeeper-5.5.4, oauth2-1.4.9, omniauth-rails_csrf_protection-0.1.2, omniauth-facebook-9.0.0, omniauth-github-1.4.0, omniauth-gitlab-2.0.0, omniauth-google-oauth2-0.8.2, omniauth-linkedin-oauth2-1.0.0, omniauth-microsoft-office365-0.0.8, omniauth-saml-1.10.3, omniauth-twitter-1.4.0, omniauth-weibo-oauth2-0.5.2, rack-attack-6.6.1, gmail_xoauth-0.4.2, koala-3.2.0, telegram-bot-ruby-0.19.2, twitter-7.0.0, email_address-0.2.3, htmlentities-4.3.4, mime-types-3.4.1, rchardet-1.8.0, biz-1.8.2, diffy-3.4.1, writeexcel-1.0.5, csv-3.2.3, browser-5.3.1, icalendar-2.7.1, icalendar-recurrence-1.1.3, telephone_number-1.4.16, messagebird-rest-4.0.0, twilio-ruby-5.67.3, acts_as_list-1.0.4, clearbit-0.3.3, net-ldap-0.17.1, slack-notifier-2.4.0, zendesk_api-1.36.0, viewpoint-1.1.1, openssl-3.0.0, actioncable-6.1.7, actionmailbox-6.1.7, actionmailer-6.1.7, actionpack-6.1.7, actiontext-6.1.7, actionview-6.1.7, activejob-6.1.7, activemodel-6.1.7, activerecord-6.1.7, activestorage-6.1.7, railties-6.1.7, sprockets-rails-3.4.2, multi_json-1.15.0, msgpack-1.5.2, nio4r-2.5.8, kgio-2.11.4, raindrops-0.20.0, delayed_job-4.1.10, http_parser.rb-0.6.0, ffi-1.15.5, ffi-compiler-1.0.1, promise.rb-0.7.4, vite_ruby-3.1.6, coffee-script-2.4.1, eco-source-1.1.0.rc.1, sassc-2.4.0, tilt-2.0.10, faraday-1.10.0, jwt-2.3.0, multi_xml-0.6.0, omniauth-1.9.2, omniauth-oauth2-1.7.2, ruby-saml-1.14.0, omniauth-oauth-1.2.0, oauth-0.5.10, addressable-2.8.0, dry-inflector-0.3.0, virtus-2.0.0, buftok-0.2.0, equalizer-0.0.11, http-4.4.1, http-form_data-2.3.0, memoizable-0.4.2, multipart-post-2.2.3, naught-1.1.0, simple_oauth-0.3.1, simpleidn-0.2.1, mime-types-data-3.2022.0105, clavius-1.0.4, ice_cube-0.16.4, nestful-1.1.4, hashie-5.0.0, inflection-1.0.0, httpclient-2.8.3, logging-2.3.1, nori-2.6.0, rubyntlm-0.6.3, websocket-driver-0.7.5, dry-cli-0.7.0, rack-proxy-0.7.2, coffee-script-source-1.12.2, faraday-em_http-1.0.0, faraday-em_synchrony-1.0.0, faraday-excon-1.1.0, faraday-httpclient-1.0.1, faraday-multipart-1.0.4, faraday-net_http-1.0.1, faraday-net_http_persistent-1.2.0, faraday-patron-1.0.0, faraday-rack-1.0.0, faraday-retry-1.0.3, ruby2_keywords-0.0.5, public_suffix-4.0.7, axiom-types-0.1.1, coercible-1.0.0, descendants_tracker-0.0.4, http-cookie-1.0.5, http-parser-1.2.3, thread_safe-0.3.6, unf-0.1.4, racc-1.6.0, little-plugger-1.1.4, ice_nine-0.11.2, domain_name-0.5.20190701, unf_ext-0.0.8.2 in any of the sources
Run bundle install to install missing gems.

And when I try bundle install I get :

bundle install
Fetching gem metadata from https://rubygems.org/
Using rake 13.0.6
Using simple_po_parser 1.1.6
Using PoParser 3.2.6
Using concurrent-ruby 1.1.10
Using aasm 5.2.0
Using i18n 1.12.0
Using minitest 5.16.3
Using tzinfo 2.0.5
Using zeitwerk 2.6.0
Using activesupport 6.1.7
Using builder 3.2.4
Using erubi 1.11.0
Using mini_portile2 2.8.0
Fetching racc 1.6.0
Installing racc 1.6.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /usr/share/rvm/gems/ruby-3.0.4/gems/racc-1.6.0/ext/racc/cparse

/usr/share/rvm/rubies/ruby-3.0.4/bin/ruby -I /usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0 -r ./siteconf20221118-276487-lg01hp.rb extconf.rb
checking for rb_block_call()… yes
checking for rb_ary_subseq()… yes
creating Makefile

current directory: /usr/share/rvm/gems/ruby-3.0.4/gems/racc-1.6.0/ext/racc/cparse
make DESTDIR= clean

current directory: /usr/share/rvm/gems/ruby-3.0.4/gems/racc-1.6.0/ext/racc/cparse
make DESTDIR=
compiling cparse.c
linking shared-object racc/cparse.so

current directory: /usr/share/rvm/gems/ruby-3.0.4/gems/racc-1.6.0/ext/racc/cparse
make DESTDIR= install
make: /usr/bin/mkdir: Command not found
make: *** [Makefile:202: .sitearchdir.-.racc.time] Error 127

make install failed, exit code 2

Gem files will remain installed in /usr/share/rvm/gems/ruby-3.0.4/gems/racc-1.6.0 for inspection.
Results logged to /usr/share/rvm/gems/ruby-3.0.4/extensions/x86_64-linux/3.0.0/racc-1.6.0/gem_make.out

/usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/rubygems/ext/builder.rb:93:in run' /usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/rubygems/ext/builder.rb:44:in block in make’
/usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/rubygems/ext/builder.rb:36:in each' /usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/rubygems/ext/builder.rb:36:in make’
/usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/rubygems/ext/ext_conf_builder.rb:63:in block in build' /usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/tempfile.rb:317:in open’
/usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/rubygems/ext/ext_conf_builder.rb:26:in build' /usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/rubygems/ext/builder.rb:159:in build_extension’
/usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/rubygems/ext/builder.rb:193:in block in build_extensions' /usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/rubygems/ext/builder.rb:190:in each’
/usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/rubygems/ext/builder.rb:190:in build_extensions' /usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/rubygems/installer.rb:837:in build_extensions’
/usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/bundler/rubygems_gem_installer.rb:71:in build_extensions' /usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/bundler/rubygems_gem_installer.rb:28:in install’
/usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/bundler/source/rubygems.rb:204:in install' /usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/bundler/installer/gem_installer.rb:54:in install’
/usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/bundler/installer/gem_installer.rb:16:in install_from_spec' /usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/bundler/installer/parallel_installer.rb:186:in do_install’
/usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/bundler/installer/parallel_installer.rb:171:in install_serially' /usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/bundler/installer/parallel_installer.rb:97:in call’
/usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/bundler/installer/parallel_installer.rb:71:in call' /usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/bundler/installer.rb:262:in install_in_parallel’
/usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/bundler/installer.rb:209:in install' /usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/bundler/installer.rb:89:in block in run’
/usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/bundler/process_lock.rb:12:in block in lock' /usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/bundler/process_lock.rb:9:in open’
/usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/bundler/process_lock.rb:9:in lock' /usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/bundler/installer.rb:71:in run’
/usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/bundler/installer.rb:23:in install' /usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/bundler/cli/install.rb:60:in run’
/usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/bundler/cli.rb:253:in block in install' /usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/bundler/settings.rb:131:in temporary’
/usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/bundler/cli.rb:252:in install' /usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/command.rb:27:in run’
/usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command' /usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor.rb:392:in dispatch’
/usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/bundler/cli.rb:31:in dispatch' /usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/base.rb:485:in start’
/usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/bundler/cli.rb:25:in start' /usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/gems/3.0.0/gems/bundler-2.2.33/libexec/bundle:49:in block in <top (required)>’
/usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/3.0.0/bundler/friendly_errors.rb:103:in with_friendly_errors' /usr/share/rvm/rubies/ruby-3.0.4/lib/ruby/gems/3.0.0/gems/bundler-2.2.33/libexec/bundle:37:in <top (required)>’
/usr/share/rvm/gems/ruby-3.0.4/bin/bundle:23:in load' /usr/share/rvm/gems/ruby-3.0.4/bin/bundle:23:in
/usr/share/rvm/gems/ruby-3.0.4/bin/ruby_executable_hooks:22:in eval' /usr/share/rvm/gems/ruby-3.0.4/bin/ruby_executable_hooks:22:in

An error occurred while installing racc (1.6.0), and Bundler cannot continue.

In Gemfile:
rails was resolved to 6.1.7, which depends on
actioncable was resolved to 6.1.7, which depends on
actionpack was resolved to 6.1.7, which depends on
actionview was resolved to 6.1.7, which depends on
rails-dom-testing was resolved to 2.0.3, which depends on
nokogiri was resolved to 1.13.9, which depends on
racc

Do I just attempt to restore from a backup ? Sorry if these are beginner errors.

i am getting this error which is menssion below

An error occurred while installing rszr (1.3.0), and Bundler cannot continue.