# Help with asdf and bundle

**URL:** https://meta.discourse.org/t/help-with-asdf-and-bundle/292287
**Category:** Development
**Created:** [January 19, 2024, 8:23pm UTC](https://meta.discourse.org/t/help-with-asdf-and-bundle/292287 "2024-01-19T20:23:11Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [January 19, 2024, 8:23pm UTC](https://meta.discourse.org/t/help-with-asdf-and-bundle/292287/1 "2024-01-19T20:23:12Z")

</div>

This isn’t really a Discourse problem, but I have it only with Discourse. I’ve done some other searching to no avail, so I’m here now.

If I run `bundle install` in a freshly cloned discourse directory, I get this:

```plaintext
(main) pfaffman@noreno:~/discourse$ bundle install
/home/pfaffman/.asdf/installs/ruby/3.2.2/bin/bundle:25:in `load': cannot load such file -- /home/pfaffman/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.5.3/exe/bundle (LoadError)

```

If I run it in a directory that has a plugin in it, it works just fine. A while ago, I swear that I cloned discourse and got `bundle install` to work, but then it stopped.

Here’s how I set things up to try to get stuff to have the right versions of stuff. I think it’s the problem somehow. For some months, or a year, maybe, this worked to get the proper versions of stuff from the latest docker image.

```plaintext
  DISCOURSE_SRC=/home/pfaffman/src/discourse-repos/discourse
  DISCOURSE_DOCKER_SRC=/home/pfaffman/src/discourse-repos/discourse_docker
  cd $DISCOURSE_SRC

  git -C $DISCOURSE_DOCKER_SRC pull https://github.com/discourse/discourse_docker
  DISCOURSE_BASE=$(grep -e ^image= $DISCOURSE_DOCKER_SRC/launcher|cut -d'"' -f2)
  cd -

  docker pull $DISCOURSE_BASE
  asdf plugin add nodejs #https://github.com/asdf-vm/asdf-nodejs.git
  asdf plugin add ruby #https://github.com/asdf-vm/asdf-ruby.git
  asdf plugin add imagemagick
  asdf plugin update --all
  RUBY_VERSION=$(grep -e ^RUBY_VERSION $DISCOURSE_DOCKER_SRC/image/base/install-ruby|cut -d'"' -f2)
  echo "GOT RUBY VERSION!! $RUBY_VERSION"
  asdf install ruby $RUBY_VERSION
  asdf global ruby $RUBY_VERSION
  IMAGE_MAGICK_VERSION=$(grep -e ^IMAGE_MAGICK_VERSION ~//src/discourse-repos/discourse_docker/image/base/install-imagemagick|cut -d'"' -f2)
  echo "GOT IMAGE_MAGICK_VERSION: $IMAGE_MAGICK_VERSION"
  asdf install imagemagick $IMAGE_MAGICK_VERSION
  asdf global imagemagick $IMAGE_MAGICK_VERSION
  # 2023-04-24 debian and pop!os have different nodejs versions
  NODE_VERSION=$(docker run discourse/base:release bash -c 'node --version'|cut -d'v' -f2)
  #NODE_VERSION=$(grep node ~/src/discourse-repos/discourse/.tool-versions|awk '{print $2}')
  echo "GOT NODEJS version: $NODE_VERSION"
  asdf install nodejs $NODE_VERSION
  asdf global nodejs $NODE_VERSION
  npm install -g yarn
  sleep 2
  # end of version updates
  cd $DISCOURSE_SRC
  git checkout main
  git pull
  bundle install
  ./bin/rake db:migrate
  RAILS_ENV=test ./bin/rake db:migrate
  git checkout main
  git pull
  bundle install
  yarn install
  ./bin/rake db:migrate
  RAILS_ENV=test ./bin/rake db:migrate
  exit

```

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [January 20, 2024, 3:21pm UTC](https://meta.discourse.org/t/help-with-asdf-and-bundle/292287/2 "2024-01-20T15:21:13Z")

</div>

Finally fixed it with

```plaintext
gem install bundler -v 2.5.3

```

Not sure why it didn’t know to install the version that it wanted.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [February 19, 2024, 3:21pm UTC](https://meta.discourse.org/t/help-with-asdf-and-bundle/292287/3 "2024-02-19T15:21:31Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
