Project

General

Profile

Redmine miss read my ruby version

Added by erchad haikal over 4 years ago

I want to upgrade my redmine from 3xx to 4.1.1
My ruby version is 2.4.1
But when I run this command :

bundle install --without development test

I got messages :

Your Ruby version is 2.0.0, but your Gemfile specified >= 2.3.0, < 2.7.0

My ruby version is :

# ruby -v
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]

Please help me to fix this. Thanks


Replies (7)

RE: Redmine miss read my ruby version - Added by Mischa The Evil over 4 years ago

It looks like you have multiple Ruby interpreters installed on the system. You can check this by running:

which -a ruby

Did you run bundle install --without development test in your Redmine directory? How did you install Redmine? Do you use any Ruby version manager? Did you install Ruby with your system's package management system? What's your OS, Web-server and Application-server?

RE: Redmine miss read my ruby version - Added by erchad haikal over 4 years ago

thankyou for your respons, when I run which -a ruby, i got output :

# which -a ruby
/usr/local/rvm/rubies/ruby-2.4.1/bin/ruby
/usr/bin/ruby

when I check it one by one, I got :

# /usr/bin/ruby -v
ruby 2.0.0p648 (2015-12-16) [x86_64-linux]

Well, thanks for your help, I'll gonna find some documentation to disable that ones. Thanks a lot :D

RE: Redmine miss read my ruby version - Added by erchad haikal over 4 years ago

sorry can I ask you for one more question ?
How can I change the bundle install to read the ruby from /usr/local/rvm/rubies/ruby-2.4.1/bin/ruby ?

I'm using Operating System Rhel Fedora, and apache2 for web Server Apps

RE: Redmine miss read my ruby version - Added by Mischa The Evil over 4 years ago

This confirms that you are using RVM as a Ruby version manager. Given the paths provided by which I see you installed Ruby 2.4.1 using RVM. Simultaneously have you installed Ruby 2.0.0 using Fedora's package management system (rpm, yum, etc.). You could check that with a command like:

rpm -qa | grep ruby

How to solve this issue depends entirely on your situation. Some variables are:
  • Why did you install two Ruby versions using two separate ways? What version(s) do you want to use? Do you need a system Ruby?
  • Do you actually want to use RVM? How did you install RVM? What's you RVM configuration? Do you use project-specific (per-directory) RVM configurations?
  • Can you and/or do you want to set a (new) system default Ruby?
  • What Ruby version were you running the previous Redmine version with?
  • As what user do you run Redmine? You say you use Apache as a web-server, but what application-server do you use? Their both configurations determine the user account that runs Redmine. Given that the used executable is co-determined by the user's $PATH environment variable, this is important to know.
  • How did you install Redmine? And in what directory?

TL;DR: Set the default Ruby using RVM (to 2.4.1) and you probably would be fine.

Just as a suggestion I'd advise you to invest some time into understanding the (management of a) Ruby on Rails stack from the ground up ([Hardware,] OS, Networking/TCP-IP/HTTP, (Web-/Application)-Servers, Interpreters, RVM and Gemsets, Gems, Bundler, Rails, etc.). This would greatly improve your ability to maintain a Redmine deployment in a sustainable manner over a longer period of time.

Some references:

RE: Redmine miss read my ruby version - Added by erchad haikal over 4 years ago

Hello. I have already success to run bundle install. I uninstall ruby from yum package, because I didn't using it.

As what user do you run Redmine? You say you use Apache as a web-server, but what application-server do you use?
I just know it, I used passenger application server

RE: Redmine miss read my ruby version - Added by Mischa The Evil over 4 years ago

I'm glad that you have been able to solve the issue you were having.

RE: Redmine miss read my ruby version - Added by whitaker shriram about 4 years ago

Ruby interpreters installed on the system. You can check this by running:

    (1-7/7)