I just got my RoR environment all set up and running. I made my first application with sqlite.
I now want to try Mysql. I have XAMPP from when I did a bit of PHP over a year ago, therefor MYSQL is installed. I now want to set up my applications with mysql. I am setting mysql to start from the XAMPP conrol panel. Go to my application and type ‘gem install mysql’ to get started but I get:
Fetching: mysql-2.9.0.gem (100%)
ERROR: While executing gem … (Errno::EACCES)
Permission denied – /Users/lambert/.rvm/gems/ruby-1.9.3-p362/cache/mysql-2.9.0.gem
Any ideas, my next step would be to uninstall my XAMPP installation altogether and download mysql, get started from scratch and follow the tutorials all over the web. But if it can be kept…
You have to install
mysql2adapter for working mysql with RoR.Use this command to install the adapter.
gem install mysql2then create the project with
rails new MyProject -d mysqlthis will create your project with MySQL as database.
after that in
database.ymlfile you can edit your username, password for MySQL.