Topic: Newbie Problems configuring MySQL with Rails on OS X Tiger

I have been following the instructions here on this site : http://hivelogic.com/articles/2005/12/0 … ysql_tiger so I can install Ruby on Rails.

Prior to following the install guide on the Hivelogic site I downlaoded and installed MacPorts/Darwin Port and set up my profile PATH as described here : http://trac.macosforge.org/projects/mac … ngMacPorts

All the set up procedure has worked and I can excecute rails commands when I navigate in terminal to my /User/ directory however I cannot get MySQL to run. Can any kind person help me work out where I have goen wrong?

Below are 2 links to grabs of my terminal windows and my ".profile" and ".bash_login" :

.profile : "export PATH="/opt/local/bin:/opt/local/sbin:$PATH
export DISPLAY=0.0"

.bash_login : "export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH""


Grab 1 : All my MySQL files, installed by the dmg file are in /usr/local/ : http://homepage.mac.com/andycet/filechu … re%204.png

Grab 2 : All my rails files are in main directory "/" : http://homepage.mac.com/andycet/filechu … re%206.png

Any Help would be appreciated I think I just have my PATHS totally wrong.

Re: Newbie Problems configuring MySQL with Rails on OS X Tiger

I can see the above post is a bit daunting. I had a look through terrminal again. All of my rails stuff is installed in /usr/local/bin where as mysql and mysql-standard-5.0.27-osx10.4-powerpc are in /usr/local/ folder my path info is above, do I need to set up a path/link or move my mysql to local/bin/ ?

Getting frustrated found loads of tutorials and ordered my ruby for rails book but cant get going sad

Re: Newbie Problems configuring MySQL with Rails on OS X Tiger

You shouldn't need to move MySQL.

Is MySQL itself running? try running mysql in the command line. There are a couple other packages included in the MySQL download which will add a MySQL System Preference pane (allowing you to start/stop it manually) and a MySQL Auto Startup script. I usualy install both.

Railscasts - Free Ruby on Rails Screencasts

Re: Newbie Problems configuring MySQL with Rails on OS X Tiger

yip installed all 3 and it say MySQL is running, I'm trying to search google to see how I find what the socket path is for my mysql install

and when I type "mysql" into the command line I get the control panel.

Do you know how I can identify the socket to make sure I am putting the correct path into my database yml file?

Last edited by Opel (2006-11-24 12:17:21)

Re: Newbie Problems configuring MySQL with Rails on OS X Tiger

What exactly isn't working? Are you receiving an error message? Can Rails simply not connect to MySQL?

Railscasts - Free Ruby on Rails Screencasts

Re: Newbie Problems configuring MySQL with Rails on OS X Tiger

sorry right MySQL is work, I know this becuaase when I type my commands in Terminal everything runs ok and managed to set a new password.

Rails is runninf because when I navigate to /users/my-page/ I can run rails scripts like start server and make a new  project

The problem seems to be that I cannot get my mysql to execut the commands in this tutorial, http://developer.apple.com/tools/rubyonrails.html , to make a DB connection

Re: Newbie Problems configuring MySQL with Rails on OS X Tiger

Woo hoo after much searching and findling managed to get things working. I basically need to set up my mysql stuff and then use cd /User/mypage/myproject/ to get going.

Now i can start learning smile

Re: Newbie Problems configuring MySQL with Rails on OS X Tiger

Spoke too soon, after managing to migrate my test database I got an "internal 500 error" message when I went to http://localhost/project but I get my welcome aboard message if I just got to localhost:3000

my terminal is saying :
script/server
=> Booting lighttpd (use 'script/server webrick' to force WEBrick)
=> Rails application started on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server (see config/lighttpd.conf for options)
2006-11-24 17:53:14: (network.c.300) can't bind to port: 0.0.0.0 3000 Address already in use
Exiting

Re: Newbie Problems configuring MySQL with Rails on OS X Tiger

Opel wrote:

2006-11-24 17:53:14: (network.c.300) can't bind to port: 0.0.0.0 3000 Address already in use
Exiting

This means there is already something using port 3000. You may already have the server running. You can look for an existing ruby process and kill it then try starting up the server again. I don't think this is the problem with the 500 error though. In fact, you shouldn't be getting 500 errors, insteaad you should be getting an exception error message from Rails. Strange.

Railscasts - Free Ruby on Rails Screencasts

Re: Newbie Problems configuring MySQL with Rails on OS X Tiger

yeah just restarted my server and it worked smile