# Modern Front-End Development for Rails B7: bin/setup (page xv)

**URL:** <https://forum.devtalk.com/t/modern-front-end-development-for-rails-b7-bin-setup-page-xv/7792>\
**Category:** PragProg Customers\
**Tags:** book-modern-front-end-development-for-rails, suggestion\
**Created:** [12 March 2021 02:05 UTC](https://forum.devtalk.com/t/modern-front-end-development-for-rails-b7-bin-setup-page-xv/7792 "2021-03-12T02:05:33Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![RobOldCodes](https://forum.devtalk.com/user_avatar/forum.devtalk.com/roboldcodes/32/2584_2.png) [@RobOldCodes](https://forum.devtalk.com/u/RobOldCodes)\
**Post date:** [12 March 2021 02:05 UTC](https://forum.devtalk.com/t/modern-front-end-development-for-rails-b7-bin-setup-page-xv/7792/1 "2021-03-12T02:05:33Z")

</div>

Hi, I just got bitten by this issue when trying to run the initial `bin/setup` command:

> <https://github.com/bibendi/activerecord-postgres_enum/issues/40>
>
> Describe the bug
> Hi, folks. Caught strange bug
> Ruby 3.0 + Rails 6.1
> \# Gemfile
> gem 'activerecord-postgres\_enum', '~\> 1.5'
> \# my migration file
> class CreateItemImages \< ActiveRecord::Migration\[6.1\]
> ...

To work with the latest versions I’ve had to lock down the gemfile:  
gem “activerecord-postgres\_enum”, ‘~\> 1.6’

---

<div class="post-metadata">

**Author:** ![noelrappin](https://forum.devtalk.com/user_avatar/forum.devtalk.com/noelrappin/32/481_2.png) [@noelrappin](https://forum.devtalk.com/u/noelrappin)\
**Post date:** [12 March 2021 03:33 UTC](https://forum.devtalk.com/t/modern-front-end-development-for-rails-b7-bin-setup-page-xv/7792/2 "2021-03-12T03:33:26Z")

</div>

Thanks for catching that, must be that particular combination of versions.

---

<div class="post-metadata">

**Author:** ![alanq](https://forum.devtalk.com/letter_avatar_proxy/v4/letter/a/e9bcb4/32.png) [@alanq](https://forum.devtalk.com/u/alanq)\
**Post date:** [12 March 2021 16:26 UTC](https://forum.devtalk.com/t/modern-front-end-development-for-rails-b7-bin-setup-page-xv/7792/3 "2021-03-12T16:26:01Z")

</div>

I changed the migration to avoid a db enum:

```auto
    # create_enum(:enum_ilk, %w[concert meet_n_greet battle])
    # create_enum(:enum_access, %w[general members vips])

    create_table(:concerts) do |t|
      t.string(:name)
      t.text(:description)
      t.datetime(:start_time)
      t.references(:venue, null: false, foreign_key: true)
      t.text(:genre_tags)
      # t.enum(:ilk, enum_name: :enum_ilk)
      # t.enum(:access, enum_name: :enum_access)
      t.integer :ilk
      t.integer :access

      t.timestamps
    end

```

and in the model

```auto
  # enum ilk: {concert: "concert", meet_n_greet: "meet_n_greet", battle: "battle"}
  # enum access: {general: "general", members: "members", vips: "vips"}
  enum ilk: %w[concert meet_n_greet battle]
  enum access: %w[general members vips]

```

---

<div class="post-metadata">

**Author:** ![noelrappin](https://forum.devtalk.com/user_avatar/forum.devtalk.com/noelrappin/32/481_2.png) [@noelrappin](https://forum.devtalk.com/u/noelrappin)\
**Post date:** [12 March 2021 16:44 UTC](https://forum.devtalk.com/t/modern-front-end-development-for-rails-b7-bin-setup-page-xv/7792/4 "2021-03-12T16:44:44Z")

</div>

That’ll also work, it’s not really an issue for any of the other code, maybe it’s worth pulling back to that in the final code in the name of having one less dependency.

---

<div class="post-metadata">

**Author:** ![bjnord](https://forum.devtalk.com/user_avatar/forum.devtalk.com/bjnord/32/730_2.png) [@bjnord](https://forum.devtalk.com/u/bjnord)\
**Post date:** [3 April 2021 16:32 UTC](https://forum.devtalk.com/t/modern-front-end-development-for-rails-b7-bin-setup-page-xv/7792/5 "2021-04-03T16:32:17Z")

</div>

I got the same with Rails 6.1.0, PostgreSQL 9.6 under Amazon Linux 2.

---

<div class="post-metadata">

**Author:** ![cutehax](https://forum.devtalk.com/user_avatar/forum.devtalk.com/cutehax/32/2776_2.png) [@cutehax](https://forum.devtalk.com/u/cutehax)\
**Post date:** [17 April 2021 19:09 UTC](https://forum.devtalk.com/t/modern-front-end-development-for-rails-b7-bin-setup-page-xv/7792/6 "2021-04-17T19:09:18Z")

</div>

I’m ~~staggered~~ bewildered how I don’t see anything about the fact that on page 32 it states _The code uses Ruby version 2.7.2_ yet all the Gem files in the latest download state Ruby 3.0.0.  
**nrclient-code.zip** as of today (SHA265 9739e689b3f94a927e7074f9d311d6b7e067ad773826cd42689c67a14c88956d) has no `main` directory and `bin/setup` throws `"rbenv" version '3.0.0' is not installed.` Can we not get this into Github and iterate faster? Dying to get into this book.

---

<div class="post-metadata">

**Author:** ![noelrappin](https://forum.devtalk.com/user_avatar/forum.devtalk.com/noelrappin/32/481_2.png) [@noelrappin](https://forum.devtalk.com/u/noelrappin)\
**Post date:** [17 April 2021 19:45 UTC](https://forum.devtalk.com/t/modern-front-end-development-for-rails-b7-bin-setup-page-xv/7792/7 "2021-04-17T19:45:04Z")

</div>

Hi - thanks or your interest. The text was not updated – my mistake – the code uses Ruby 3.0.0, and you should be fine if you install that version.

Where it says `main` directory, you can start with the `turbo_01` directory.

All this has been cleaned up fro the next beta.

Noel

---

<div class="post-metadata">

**Author:** ![cutehax](https://forum.devtalk.com/user_avatar/forum.devtalk.com/cutehax/32/2776_2.png) [@cutehax](https://forum.devtalk.com/u/cutehax)\
**Post date:** [17 April 2021 23:13 UTC](https://forum.devtalk.com/t/modern-front-end-development-for-rails-b7-bin-setup-page-xv/7792/8 "2021-04-17T23:13:26Z")

</div>

Appreciated, thanks.
