Jump to content

The ultimate community for Ruby on Rails developers.


Photo

Novice: Rails mySQL Problem

mysql apache webserver webrick

  • Please log in to reply
1 reply to this topic

#1 makoyrails

makoyrails

    Passenger

  • Members
  • 1 posts

Posted 13 July 2014 - 08:03 AM

Hi,

 

I am new to rails. Prior to rails I have a WAMP installed on my PC (Windows 8). I was able to install rails with no problem but when I visited loaclhost:3000 I have an error in mySQL connection. Tried some fixes and found out that mySQL service does not start with "rails server." I figured this out because when I started WAMP services there was no error in localhost:3000. 

 

I really don't know what questions to ask but here are some so please help:

 

How do i start mySQL when I start rails server?

 

I understand that webrick is the server but I have apache. How can I access or start mysql with webrick? or can i access the install apache in wamp to start mysql? if so, how?

 

hope someone understands me. LOL. But help please if you do. Thanks in advance!



#2 Ohm

Ohm

    Driver

  • Moderators
  • 398 posts
  • LocationCopenhagen

Posted 13 July 2014 - 11:47 AM

It's correct that you need your MySQL to be running before launching the WEBrick server. If you want to do this automatically, you can use something like Foreman (https://github.com/ddollar/foreman) to setup the MySQL server before launching the WEBrick server.

 

I believe that WAMP has a "Use MySQL as a service" feature, where the MySQL server is automatically launched together with Windows? You could use that, but do know that the MySQL server would be running at all times then.


Blog: http://ohm.sh | Twitter: @madsohm





Also tagged with one or more of these keywords: mysql, apache, webserver, webrick

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users