# Installation to incorrect directory with chruby

**URL:** <https://talk.jekyllrb.com/t/installation-to-incorrect-directory-with-chruby/8098>\
**Category:** Help\
**Created:** [March 15, 2023, 6:43pm UTC](https://talk.jekyllrb.com/t/installation-to-incorrect-directory-with-chruby/8098 "2023-03-15T18:43:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tnine](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/tnine/32/5174_2.png) [@tnine](https://talk.jekyllrb.com/u/tnine)\
**Post date:** [March 15, 2023, 6:43pm UTC](https://talk.jekyllrb.com/t/installation-to-incorrect-directory-with-chruby/8098/1 "2023-03-15T18:43:52Z")

</div>

Hello,  
I’ve followed the instructions [listed here](https://jekyllrb.com/docs/installation/macos/), but I’m having issues executing jekyll. This is due to the GEM not installing into the GEM\_PATH as expected. See the information below.

```auto
➜ ~ chruby
 * ruby-3.1.3

```

```auto
➜ ~ gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 3.4.8
  - RUBY VERSION: 3.1.3 (2022-11-24 patchlevel 185) [x86_64-darwin22]
  - INSTALLATION DIRECTORY: /Users/tnine/.gem/ruby/3.1.3
  - USER in DIRECTORY: /Users/tnine/.gem/ruby/3.1.0
  - RUBY EXECUTABLE: /Users/tnine/.rubies/ruby-3.1.3/bin/ruby
  - GIT EXECUTABLE: /usr/local/bin/git
  - EXECUTABLE DIRECTORY: /Users/tnine/.gem/ruby/3.1.3/bin
  - SPEC CACHE DIRECTORY: /Users/tnine/.gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /Users/tnine/.rubies/ruby-3.1.3/etc
  - RUBYGEMS PLATFORMS:
     - ruby
     - x86_64-darwin-22
  - GEM PATHS:
     - /Users/tnine/.gem/ruby/3.1.3
     - /Users/tnine/.rubies/ruby-3.1.3/lib/ruby/gems/3.1.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
     - "install" => "--user --no-document"
     - "update" => "--user --no-document"
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /usr/local/opt/scala@2.11/bin
     - /Users/tnine/.gem/ruby/3.1.3/bin
     - /Users/tnine/.rubies/ruby-3.1.3/lib/ruby/gems/3.1.0/bin
     - /Users/tnine/.rubies/ruby-3.1.3/bin
     - /usr/local/Cellar/pyenv-virtualenv/1.1.5/shims
     - /Users/tnine/.pyenv/shims
     - /Users/tnine/.pyenv/bin
     - /Applications/IntelliJ IDEA.app/Contents/MacOS
     - /Users/tnine/.jenv/shims
     - /Users/tnine/.jenv/bin
     -
     - /Users/tnine/develop/go/bin
     - /usr/local/bin
     - /System/Cryptexes/App/usr/bin
     - /usr/bin
     - /bin
     - /usr/sbin
     - /sbin
     - /Library/Apple/usr/bin
     - /Users/tnine/.gem/ruby/3.1.0/bin/
     - /Applications/Visual Studio Code.app/Contents/Resources/app/bin
     - /usr/local/sbin

```

```auto
➜ ~ gem install jekyll
WARNING: You don't have /Users/tnine/.gem/ruby/3.1.0/bin in your PATH,
	  gem executables will not run.
Successfully installed webrick-1.8.1
Successfully installed unicode-display_width-2.4.2
Successfully installed terminal-table-3.0.2
Successfully installed safe_yaml-1.0.5
Successfully installed rouge-4.1.0
Successfully installed forwardable-extended-2.6.0
Successfully installed pathutil-0.16.2
Successfully installed mercenary-0.4.0
Successfully installed liquid-4.0.4
Successfully installed kramdown-2.4.0
Successfully installed kramdown-parser-gfm-1.1.0
Building native extensions. This could take a while...
...

```

As you can see, jekyll is installing to the `USER` directory, not the `INSTALLATION` directory in the Gem env. Is this a bug, or is `chruby` not setting my path correctly? It seems to be setting it to the INSTALLATION value in my gem env. Note that my PATH contains the following directories.

```auto
/Users/tnine/.gem/ruby/3.1.3/bin:/Users/tnine/.rubies/ruby-3.1.3/lib/ruby/gems/3.1.0/bin

```

Any idea what’s going on with my env? It’s been a while since I’ve used Ruby, so I’m unsure if the issue is with chruby, or the installation env value that jekyll is using.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [March 15, 2023, 7:51pm UTC](https://talk.jekyllrb.com/t/installation-to-incorrect-directory-with-chruby/8098/2 "2023-03-15T19:51:35Z")

</div>

did you try adding the other path into your PATH?

maybe you have both ruby 3.1.0 and 3.1.3 installed? or maybe chruby is a ruby version manager? I’m not familiar with it.

I see lots of issues here where ruby is installed multiple times and uninstalling and re-installing seems to help.
