New Discussion

Notifications

You’re not receiving notifications from this thread.

Rails for Mac OS Catalina

2
General

Hello,

Super excited to be part of this group as I am in need of help. I have an existing Rails project that I cannot run anymore. I followed the steps here (https://gorails.com/setup/osx/10.15-catalina) and now when checking for ruby version, i still get the old version 2.6.3 while it also shows that I successfully installed 2.7.0.

Also when I run "rails -v" outside the of my rails project and I get a response "Rails 6.0.2.2" but once running rails -v within my project it tells me to run a "bundle install" I get this error:

"An error occurred while installing mysql2 (0.4.10), and Bundler cannot continue.
Make sure that gem install mysql2 -v '0.4.10' --source 'https://rubygems.org/' succeeds before bundling. "

I have been struggling with this for a few days now. I sincerely need and would be genuinely be grateful for any advise.

Thank you,

It probably wouldn't hurt upgrading to the latest version of mysql2: https://rubygems.org/gems/mysql2

If your app has a .ruby-version file, then it will use the Ruby version in that file for the project.

Thank you, Chris for such a speedy reply.

I already did a manual "gem install mysql2" and I get this:
"ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension."
Under my Gemfile I also have "gem 'mysql2', '~> 0.4.10'" before I run the bundle install command.

Aslo the confusing part is it appears that I have two installed ruby versions:
marcguerrero@Marcs-MacBook-Air My_JobList % ruby -v
ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
marcguerrero@Marcs-MacBook-Air My_JobList % rvm current
ruby-2.7.0
marcguerrero@Marcs-MacBook-Air My_JobList % rbenv version
2.7.0 (set by /Users/marcguerrero/Rails/proj/.ruby-version)
Not sure where I can check which version my app uses, and if so, how can I switch it to work with the latest ruby version?

Thank you.

Join the discussion
Create an account Log in

Learning Ruby on Rails? Join our newsletter.

We won't send you spam. Unsubscribe at any time.