Macbok M2 – Ruby on Rails installation – Problem [Solved]

Ruby – User RVM for Ruby installation and use ruby version greater than 3 for better performance.

Mysql:

Install via official site https://dev.mysql.com/downloads/mysql/

use youtube link how to install mysql here.

Add below line in ~/.bash_profile file :

export PATH=${PATH}:/usr/local/mysql-8.0.33-macos13-arm64/bin

where you may have to change mysql version in the path ie. mysql-8.0.33-macos13-arm64 to your mysql bin path.

It took more than 24 hours to solve this problem so I posted it in my blog here.

Thanks & Regards,

Manish Shrivastava

[Solved]: Incorrect datetime value: ‘0000-00-00 00:00:00’ for column

Problem faced: Incorrect datetime value: ‘0000-00-00 00:00:00’ for column.

Solution: The best way to do this is to export the MySQL dump file using below command from the database.

mysqldump -uroot -ppasswordname databasename > database_name.sql

Now, you have `database_name.sql` and try to open the file and search the string `0000-00-00 00:00:00` and replace it with `CURRENT_TIMESTAMP`. You can do that with below command:

sed -i.bu 's/'\''0000-00-00 00:00:00'\''/CURRENT_TIMESTAMP/g' database_name.sql

Once in your file when you replaced all `0000-00-00 00:00:00` with `CURRENT_TIMESTAMP`. You can import that into new separate MySQL 5.7 installed separately successfully.

However, there are different suggestion at stackoverflow. You can go through this if you need.

That’t it. You can test that and let me know if anything.

Cheers