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 trialmateusz sawka
13,222 Pointsrake db:create fails
I know many people have some issues with that command, but did not find anything like mine problem. First I had some problems with mysql, but finally managed to install it (I guess).
The problem is when I run rake db:create i get a thousand lines popping on the screen and stop with that message:
............................................................................................. [NOTE] You may have encountered a bug in the Ruby interpreter or extension libraries. Bug reports are welcome. For details: http://www.ruby-lang.org/bugreport.html
This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. .............................................................................................
How should I deal with that?
I am running on windows 8
3 Answers
Keegan McGinnis
6,286 PointsHmmm.....Im not tooooo familiar with rails anymore, but it sounds like you need to do rake db:create insert name of file you have to put what you want to call it afterwards. Remember, im not very familiar with Ruby anymore, so i could be totally wrong.
mateusz sawka
13,222 PointsNot having an idea how to fix that I decided to try Cloud9 as Maciej Czuchnowski suggested once.
However, even though I have managed to do
rails new biller -d mysql
and
rake db:create
when i try
mysql -uroot
I get this:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Could you please suggest what I should do now?
Maciej Czuchnowski
36,441 Pointssetting up and running mysql in Cloud9 environment is different than on a normal machine. Please make sure you read the documentation for mysql on Cloud9. In general, mysql is often problematic with Rails (like Windows).
Conrad Spotts
11,768 PointsI was just dealing with this problem myself today but on a Mac. The issue seemed to be caused by having the rails gem installed in the gems for ruby-2.2.0@global but my default gem directory was set to ruby-2.2.0.
I was able to resolve it using rvm (Ruby Version Manager) by running the command rvm use 2.2.0@global --default
in a shell to set ruby-2.2.0@global as my new default. After that running rake db:create functioned. I'm not sure what the equivalent or differences you might experience on Windows 8 in trying this, but it sounds like you may be dealing with the same thing. Scrolling through my 1000 line error appeared to show the crash caused on a really low level like in C code because something was out of place or missing.
The big idea is to make sure your rails gem is in the same directory as what ruby is using as your default gem set. I just made where rails was going my new gem default.
Sorry I'm not able to get more specific than that since I'm not running a windows 8 machine, but hopefully someone else here or a google search looking at changing where your default gemset is located and how to change your default might help. Good luck!