Eric Chua

Joined

1,730 Experience
16 Lessons Completed
0 Questions Solved

Activity

Thanks, it works now. I did run git checkout d966d4f when I first posted this, but I'm not sure why it didn’t work then and does now. Anyway, it’s working—thanks again! :)

Hi all,

I bought the Learn Hotwire course and stuck at the Rails Application Introduction (3rd video).

When I ran "rails s" at 1.29 minute of the video, I got this error

'ActiveRecord::ConnectionAdapters::SQLite3Adapter#table_structure': Could not find table 'solid_queue_processes' (ActiveRecord::StatementInvalid)

I have tested rails 8.0.1 or even 8.0.2. No difference.

But I found out this post https://www.reddit.com/r/rails/comments/1gmkouh/solid_queue_in_new_rails_8_project/ and tried these steps

bin/rails db:drop
bin/rails db:create
bin/rails solid_queue:install // this wiil overwrite the queue_schema.rb
bin/rails db:prepare

When I ran "rail s", no more error.

When I compare the diff between this queue_schema.rb before and after change, I noticed the overwritten file using ActiveRecord::Schema[7.1] and the original file was 8.0. There are also other changes on indexes.

Anyway, how do I get to follow exactly like the video? Thanks.

Posted in What's New In Ruby 3.3 Discussion

ya, it works similar to yours, thanks for sharing that I need to install rust.

before install, need to uninstall

asdf uninstall ruby 3.3.0

note: do not install rust via asdf, it won't work for me.

  1. curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh // choose option 1 and enter; close Mac terminal and open again.
  2. rustc --version // make sure can see rustc version
  3. export RUBY_CONFIGURE_OPTS=--enable-yjit
  4. asdf install ruby 3.3.0
  5. asdf global ruby 3.3.0
  6. gem update --system
  7. gem install rails -v 7.1.2 // need to install this again
  8. ruby -v
  9. RUBY_YJIT_ENABLE=1 ruby -v
  10. rails -v

hope it helps others.

Posted in What's New In Ruby 3.3 Discussion

Hi Chris, I tried -> RUBY_YJIT_ENABLE=1 ruby -v but I can't see the YJIT. Do I need to install it separately? I am using Mac M2 MacBookPro.

Here's how we can do it manually, so we can continue the course (since the command db:system:change can't work)

  1. Open gemfile

comment out sqlite, and add pg gem (find the latest version from rubygems)

Use sqlite3 as the database for Active Record

gem 'sqlite3', '~> 1.4'

Use pg as the database for Active Record

gem 'pg', '~> 1.2', '>= 1.2.3'

  1. Open config/database.yml

copy all from

https://github.com/excid3/scheduled_tweets/blob/master/config/database.yml

and replace the existing file

  1. run this

rails db:setup

then

rails db:migrate

It works.

I tried to fall back to ruby 2.7.5, still same error. Any help?

Posted in The Rails db:system:change command Discussion

I am stuck with this (under part 38 of the beginner series too), same issue

On my Mac, i am getting this error

rails db:system:change --to=postgresql
Running via Spring preloader in process 42311
invalid option: --to=postgresql

Any idea?

For those who struggled to push the codes on Mac now

Have to do this

brew install gh

gh auth login

Choose github.com (not enterprise), https, Y, login to github.com, then can work