Code Monkey home page Code Monkey logo

Comments (12)

axilleas avatar axilleas commented on August 29, 2024

What is the output of rvm env and which ruby?

from gitlab-recipes.

mobdim avatar mobdim commented on August 29, 2024

rvm env

export PATH ; PATH="/usr/local/rvm/gems/ruby-2.0.0-p247/bin:/usr/local/rvm/gems/ruby-2.0.0-p247@global/bin:/usr/local/rvm/rubies/ruby-2.0.0-p247/bin:/usr/local/rvm/bin:$PATH"
export rvm_env_string ; rvm_env_string='ruby-2.0.0-p247'
export rvm_path ; rvm_path='/usr/local/rvm'
export rvm_ruby_string ; rvm_ruby_string='ruby-2.0.0-p247'
unset rvm_gemset_name
export RUBY_VERSION ; RUBY_VERSION='ruby-2.0.0-p247'
export GEM_HOME ; GEM_HOME='/usr/local/rvm/gems/ruby-2.0.0-p247'
export GEM_PATH ; GEM_PATH='/usr/local/rvm/gems/ruby-2.0.0-p247:/usr/local/rvm/gems/ruby-2.0.0-p247@global'
export MY_RUBY_HOME ; MY_RUBY_HOME='/usr/local/rvm/rubies/ruby-2.0.0-p247'
export IRBRC ; IRBRC='/usr/local/rvm/rubies/ruby-2.0.0-p247/.irbrc'
unset MAGLEV_HOME
unset RBXOPT

which ruby

/usr/local/rvm/rubies/ruby-2.0.0-p247/bin/ruby

from gitlab-recipes.

axilleas avatar axilleas commented on August 29, 2024

This is a path problem. In init service the rvm path is /usr/local/rvm/bin, see gitlab-unicorn#L44. If you change this to /usr/local/rvm/ does it work as expected? I'll take a look at it later this day as I don't have access to a CentOS VM right now.

from gitlab-recipes.

mobdim avatar mobdim commented on August 29, 2024

After being changed to /usr/local/rvm:

service gitlab start

Starting unicorn:bash: /usr/bin/bundle: /usr/bin/ruby: bad interpreter: No such file or directory
                                                           [FAILED]
Starting sidekiq: bash: /usr/bin/bundle: /usr/bin/ruby: bad interpreter: No such file or directory
                                                           [FAILED]

from gitlab-recipes.

ilkercapli avatar ilkercapli commented on August 29, 2024

My advices:

First check ruby:

which ruby

The result must looks like:

/usr/local/bin/ruby

If it is not necessary using rvm don't use it.

yum remove rvm

Than follow the white rabbit:
https://github.com/gitlabhq/gitlab-recipes/tree/master/install/centos#2-ruby

You need follow one by one all steps correctly..

When you have got any problem during installation please share screens with us and we will try to solve them together.

from gitlab-recipes.

mobdim avatar mobdim commented on August 29, 2024

It seems to me that compile ruby from source is not correct.
RVM use conveniently. Better would be to adapt the script to work in this mode.
I have running redmine ruby through rvm.

from gitlab-recipes.

ilkercapli avatar ilkercapli commented on August 29, 2024

And than, please write the result of

which ruby

You've got to add ruby bin filepath to bash profile or adding a symbolic link maybe solve your problem.
/usr/bin/ruby link to your ruby bin.

from gitlab-recipes.

ilkercapli avatar ilkercapli commented on August 29, 2024
# ------- Login as git user (if  you use username as git)
su - git

nano ~/.bash_profile

# -------- Make the following edits --------

# Change the PATH maybe you can fix ruby path or add your own system paths
PATH=$HOME/git/bin:$HOME/ruby/bin:$PATH:$HOME/bin;

# -------- Save and close the file --------

[git@server~] nano ~/.bashrc

# -------- Make the following edits --------

# Add this to the bottom. It's redundant but it solves a problem when gitlab calls /usr/bin/env
# Be sure what did you use above.. use same paths again.
PATH=$HOME/git/bin:$HOME/ruby/bin:$PATH:$HOME/bin;

# -------- Save and close the file --------

# Re-export your PATH Be sure what did you use above.. use same paths again.
[git@server~] PATH=$HOME/git/bin:$HOME/ruby/bin:$PATH:$HOME/bin;

# Verify your using the right version of Ruby now
[git@server~] which ruby
~/ruby/bin/ruby

from gitlab-recipes.

mobdim avatar mobdim commented on August 29, 2024

#121 (comment)
which ruby

/usr/local/rvm/rubies/ruby-2.0.0-p247/bin/ruby

Found the solution. Thanks for the tips.
My solution:

/usr/bin/ruby -> /usr/local/rvm/rubies/ruby-2.0.0-p247/bin/ruby

which ruby still /usr/local/rvm/rubies/ruby-2.0.0-p247/bin/ruby
but

Starting unicorn:                                          [  OK  ]
Starting sidekiq:                                          [  OK  ]

from gitlab-recipes.

axilleas avatar axilleas commented on August 29, 2024

Cool, I'll change the RVM_PATH in init script but there's got to be some other way to avoid the symbolic link and make this work seamlessly. Maybe add another variable with which ruby and then append this to the RUBY_PATH_PATCH. Leave this open to remind me make the change.

from gitlab-recipes.

ilkercapli avatar ilkercapli commented on August 29, 2024

@axilleas that sounds better I think :)

from gitlab-recipes.

axilleas avatar axilleas commented on August 29, 2024

The script has changed since you reported this and I think it handles rvm too. Closing.

from gitlab-recipes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.