First off, I learned MySQL and have always used MySQL as my database since learning it. Its opensource, as are others, but I learned it and it makes sense. I've not encountered anything yet that I couldn't use what I already know about MySQL and not learn a new Database. This is called being lazy. Becaues of this, I wanted my RoR apps to use MySQL. To do this, when you create the app you add the -d mysql option.
rails -d mysql myblog
The first time I did this, I started up the application and it crashed. I went back to the first thing I did and found it crashed too. The error log said to install the mysql gem with:
#gem install mysql
This did not work. I found out I didn't have gcc installed, which the gem program needs to install mysql.
#pkg install SUNWgcc
The install still didn't work. I ended up having to add some options.
#gem install mysql -- --with-mysql-dir=/usr/mysql/5.1
And then it all worked.
No comments:
Post a Comment