Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialPrice Matthews
18,185 PointsCannot create database. Returns 'DL is deprecated, please use Fiddle'. Also says mysql2 gem is not loaded.
Using windows. I've seen that other people have similar issues but none of their solutions worked for me.
It also says that I have not loaded the gem mysql2 which is incorrect. I installed the gem with the previous command.
3 Answers
Seth Reece
32,867 PointsHi Price,
There seems to be some issues with mysql2 v 0.4.0 and Rails 4.1+. Try using mysql2 v 0.3.18. e.g.
gem 'mysql2', '~> 0.3.18'
Price Matthews
18,185 PointsThank you. But now when I try rake db:create it returns
Could not find gem 'mysql2 (~) 0.3.18 x86-mingw32' in any of the gem sources listed in your Gemfile or available on this machine.
I really appreciate all of your help.
Seth Reece
32,867 PointsDid you install mysql server from mysql.com?
Price Matthews
18,185 PointsI just tried bundle install and that has loaded the correct gems. I have installed mysql server but now when i run rake db:create it returns
DL is deprecated, please use Fiddle
<Mysql2::Error: Can't connect to MySQL server on 'localhost' (10061)>
Couldn't create database for ....
I am unsure if I have mysql server running or not. I cannot remember how we started it in earlier vids and I am unsure of how to check to see whether I am connected or not.
Thanks, again.
Seth Reece
32,867 PointsThere is a mysql workbench that can turn the mysql server on and off. I believe the command line use is path_to_folder_you_installed_mysql_server_in\bin\mysqld .The line "DL is deprecated, please use Fiddle" is merely a warning, and should not prevent you from creating a database.
Price Matthews
18,185 PointsPrice Matthews
18,185 PointsWhen I try: gem 'mysql2', '~> 0.3.18' it returns ERROR: While executing gem ... (Gem::CommandLineError) Unknown command mysql2
Seth Reece
32,867 PointsSeth Reece
32,867 PointsSorry, I should have been more specific. That line goes in your gem file, not the terminal.