Email : [email protected]
If I can do it then it can’t be done ! … - Anonymous
Hi Everyone ! :
I’m a Ruby on Rails noobie and a Unix ignoramus (not proud of it but
there it is).
I’m starting my 1st Ruby on Rails (RoR) software project. I intend to
use MySQL as the back end database.
I used the HiveLogic article to install the various components of the
RoR development environment.
The earl for the HiveLogic article I just referred to is :
The specific tools/software packages I’ve installed are the
following :
· readline-5.1
· ruby v. 1.8.6
· rubygems v. 0.9.2
· rails v. 1.2.3
· mongrel v. 1.0.1
· subversion v. 1.4.3
· Capistrano v. ?
· MySQL v. 5.0.45 ?
I’m pretty (but not completely) confident that I’ve installed all the
aforementioned tools correctly.
The reason why I say this is that when I :
- Open up a Terminal window.
- Enter the command “cd cyf” to change the directory to the RoR
project I’ve created (which is called “cyf”). - Enter the command “script/server” to start up the Mongrel web
server for this project. - Fire up the Safari application.
- Enter the earl “http://localhost:3000/” in the earl display/input
field at the top of the Safari application. - Click on the “About your application’s environment” earl in the
“Welcome Aboard” page that typing in the previous step brings up. - Step 6 above brings up the following text displayed in a yellow
box :
Ruby version : 1.8.6 (powerpc-darwin8.10.0)
RubyGems version : 0.9.2
Rails version : 1.2.3
Active Record version : 1.15.3
Action Pack version : 1.13.3
Active Web Service version : 1.2.3
Action Mailer version : 1.3.3
Active Support version : 1.4.2
Application root version : /Users/simonwhelan/cyf
Environment version : development
Database adapter version : mysql
The specific problem that is confusing me at the moment is that I seem
to have somehow installed 2 separate versions of MySQL.
The questions that I need to resolve before I can move onto other,
more interesting RoR problems are the following :
- How do I determine which of the 2 versions of MySQL my ‘cyf’ RoR
application is using ? - Once I’ve resolved question 1 listed immediately above then should
I erase the directory containing the other version of MySQL ?
The 2 copies of MySQL I seem to have installed are called
- mysql
- mysql-5.0.45-osx10.4-powerpc
If I do the following :
- Open up a Terminal window.
- Enter the command : “cd /usr/local”.
- Enter the command : “ls”.
I get the following listing for the contents of the directory “/usr/
local”.
bin man
build mysql
include mysql-5.0.45-osx10.4-powerpc
info share
lib src
As you can see I seem to have 2 copies of the MySQL database; i.e. :
“mysql” & “mysql-5.0.45-osx10.4-powerpc”.
If I input the following 2 commands :
- Enter the command : “cd /usr/local/mysql”.
- Enter the command : “ls”.
I get the following listing for the contents of the directory “/usr/
local/mysql”.
COPYING data scripts
EXCEPTIONS-CLIENT docs share
INSTALL-BINARY include sql-bench
README lib support-files
bin man tests
configure mysql-test
If I input the following 2 commands :
- Enter the command : “cd /usr/local/mysql-5.0.45-osx10.4-powerpc”.
- Enter the command : “ls”.
I get the following listing for the contents of the directory “/usr/
local/mysql-5.0.45-osx10.4-powerpc”.
COPYING configure
man support-files
EXCEPTIONS-CLIENT data mysql-
test tests
INSTALL-BINARY docs scripts
README include share
bin lib sql-bench
As you can see from the above 2 directory listings, the files/
directories contained in both “”/usr/local/mysql" & “/mysql-5.0.45-
osx10.4-powerpc” seem to be the same.
I should also mention here that although contentsof the 2 directories
are the same, I’m not sure if the 2 directories have the same version
of MySQL. I’m reasonably but not completely sure the directory called
“”/usr/local/mysql-5.0.45-osx10.4-powerpc" contains version of 5.0.45
MySQL. I’m not sute what version of MySQL is in the other directory
named “”/usr/local/mysql".
So, I guess my basic questions are :
- How do I determine which version of MySQl is in each directory ?
- How do I determine which version of MySQL I’m running ?
- Which of the 2 copies of MySQL should I be using ?
- Is it OK to delete the other copy ?.
By the way, I’m assuming that if I can determine the answer to
questions 1 & 2 above I’ll be able to determine which of the 2
directories I can safely delete (i.e. : the directory that doesn’t
contain the version of MySQL that I happen to be running when I bring
up my RoR application).
I realize to many of you that these questions may seem to be both
rudimentary and, well, rather dopey, but the fact is that I’m just
learning RoR and I’m basically a Unix ignoramus.
I figure it’s best to ask for the advice and counsel of the people who
are on this list as they are presumably far more knowledgeable about
Ruby, Rails & UNIX than I am.
I also figure it’s better to check and make sure what I’m proposing to
do makes sense rather than go off 1st, do what I think I should doing
and risk shooting myself in the head because I don’t really know what
I’m doing.
Anyhow folks (& folkettes (no chauvinist, me !) any help, advice and
suggestions you could send my way would be immensely appreciated !
Thank you !
All the best & talk to you soon … Simon.
P.S. : I’m working on a 1.8 GHz Mac running under Mac OSX 10.4.10 .
According to “About This Mac” , “More Info …” the specific
microprocessor my machine has is a :
"CPU Type: PowerPC 970 (2.2)
"