---
title: "ลบ bundler ที่มากับ ruby 2.6"
description: "การ generate แอป rails 6 ด้วย ruby 2.6+ ในเครื่องที่ติดตั้ง bundler v2 ไว้ จะสร้าง binstub ที่ใช้งานไม่ได้ ถ้าเจอ error You must use Bundler 2 or greater with this lockfile. ให้ลบ…"
canonical: https://oozou.com/til/remove-ruby-2-6-bundled-bundler-39
locale: th
date: 2020-10-13
topic: ruby
---

# ลบ bundler ที่มากับ ruby 2.6

> การ generate แอป rails 6 ด้วย ruby 2.6+ ในเครื่องที่ติดตั้ง bundler v2 ไว้ จะสร้าง binstub ที่ใช้งานไม่ได้ ถ้าเจอ error You must use Bundler 2 or greater with this lockfile. ให้ลบ…

Published: 2020-10-13 · Topic: [ruby](https://oozou.com/th/til-topics/ruby) ([markdown](https://oozou.com/th/til-topics/ruby.md))

การ generate แอป rails 6 ด้วย ruby 2.6+ ในเครื่องที่ติดตั้ง bundler v2 ไว้ จะสร้าง binstub ที่ใช้งานไม่ได้ ถ้าเจอ error *You must use Bundler 2 or greater with this lockfile.* ให้ลบ bundler ที่มากับ ruby 2.6 ออก แล้วใช้ bundler v2 ที่ติดตั้งเองแทน

ถ้าคุณใช้ rbenv ก็ใช้คำสั่งนี้ได้เลย (ปรับตามเวอร์ชัน ruby ที่ใช้ เช่น 2.6.\{0, 1} เป็นต้น) ส่วนระบบติดตั้งอื่นจะเก็บไฟล์ไว้คนละตำแหน่ง

```shell
rm -rf ~/.rbenv/versions/2.6.1/lib/ruby/2.6.0/bundler*
```

---

Contact OOZOU: hello@oozou.com · +66 2544 0000 · https://oozou.com/th/contact

More for AI agents: https://oozou.com/llms.txt · every page has a markdown twin at its URL plus ".md"
