Eric Chua

Joined

1,570 Experience
15 Lessons Completed
0 Questions Solved

Activity

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