Welcome to the Treehouse Community
Looking to learn something new?
Migrations question, help needed?
Hey everybody I am trying to get through the migrations video. I honestly feel like I'm fighting every step of the way. Every command seems to present a new problem but, that's part of studying right?
Anywho I have reached the portion in the video where you ask Mysql to 'show databases'. The new database 'biller' that I've created does not show up in the listing. I have deleted it and started from the beginning. It shows up in my home directory on my mac and I can access it through sublime text. May someone please help me with this I am following the video but It is not showing up. Any help is greatly appreciated. Thank you in advance.
Maciej Czuchnowski36,440 Points
You are absolutely sure that you followed the steps? You created the application with additional
-d mysql flag, went inside the project folder (this one is important), entered
rake db:create, started mysql as root and entered
show databases;? And you got no errors along the way? Does the database.yml file have mysql in it set as default database? What showed up in teh terminal when you entered show databases?
I just recreated the whole process under Ubuntu (it was my first time with MySQL) and it all worked fine.Any Mac users willing to help and try to do these steps?
When I entered show databases the following showed: +--------------------+ | Database | +--------------------+ | information_schema | | test | +------- Yes I am absolutely sure ! When I started this course rake db:create worked fine mysql was acting up. Finally got that fixed and restarted then I couldn't runthe rake db:create command. I am stumped I did the database course already. Yes I had challenges but this is beyond.
I have noticed that when I run the 'ls' command after the " cd biller/' command my Gemfile.lock says config where as the instructor own says Gemfile.lock bin. I'm trying to look up the difference now to see if that's the problem.
Thanks for your help Maclej Czuchnowski I really appreciate you taking the time to answer my question. I have been struggling with this issue up til now and have spent days fighting with this using everything that i've found on google. I guess for now I'm just stuck. I am an optimist but I'm just stuck and no one seems to have the answer :) .
Okay I know that I mentioned some major issues that I was having. I am happy to report that those issues have since been fixed. As I mentioned above I did try the HomeBrew method but that initially did not take. Even after I deleted all ROR and MYSQL programs.
What I ended up doing was finding commands to run in the terminal that removed all components from my mac ( as many of the gems stayed behind even after deleting the programs). I also deleted GCC as Homebrew said that , that was a problem. Once I deleted GCC I searched my mac and once again there were residual files. I deleted all of them. I did 'Secure Empty Trash'. Then I updated my system.
After I updated my system and re-installing the software(which was interesting as some of the software did not want to work with 10.9 OS X). I was still having issues. I would have given up if this was not so important to me. I ran "brew update" and "brew doctor" several times. I was still stuck. I kept trolling the internet and finally found commands that worked.
For HomeBrew I ran " brew link openssl --forced"(apparently there is a bug in HomeBrew that has nnot been fixed as yet but this iworked for me). Then to access MySQL I ran the command " mysql -u root -p" put in my password and presto. Everything showed and I was able to access it and get through the video and build the schema. Getting this software was a rough journey but if anybody else has a problem (although problems like mine don't seem to happen often) do not give up.
Thanks Maciej Czuchnowski this is my update :D .