One person's experience with installing mx

From mx Help Wiki
Jump to: navigation, search

This is my experience with installing mx on my laptop (Apple Powerbook), so I can edit it/customize it. It's worth learning some typical Unix, MySQL, and vi commands before attempting this. I might have missed a couple steps. If there are obvious omissions please feel free to add them, and make sure you check the other installing directions (Installation). Here's what you need:


Apple's developer tools

You need developer's tools, and it's easy to get them. They should be on the start-up disk you got with your mac. Otherwise you can get them here You'll need to create an account if you don't have one already. The download is pretty straightforward. try this first:

gcc -v

If you see something other than 'command not found' you're probably ok.


Another straightforward download (I used this link). Make sure you install MySQL, the MySQL start-up item, and the MySQL.prefPane. You will also want to secure your mysql.

bash login

Make sure you have the bash login file set up correctly. Open a terminal window and type the following at the prompt (prompt$):

vi .bash_login

Now look for this line:

export PATH="/usr/local/bin:/usr/local/sbin:$PATH"

It should be at the end of the file (if the file exists); if not, hit the i key to insert, paste the line in there, hit the escape key, and then type


If you are unsure and want to leave without making changes hit escape and type this instead:


Open a new terminal window and type:

echo $PATH

You should see this:


Note from another person about defining a PATH:

The path defines where the computer will look for the necessary programs, you can add as many paths to the PATH as you want. So in the example above /usr/local/bin: is one path /sbin: is another etc. If svn is installed but when you type svn help and nothing happens then you may just need to define the correct PATH. First find where your computer has actually installed the software:

   prompt:~ Name$ find / -name svn -print : this command will take a while but will print all of the places where svn resides


  type env to find how your present PATH is set

than if these two dont match you can correct it by:

  prompt:~ Name$ echo $PATH > .bash_profile
  prompt:~ Name$ emacs .bash_profile Edit your present PATH (This uses emacs but vi will work)
  prompt:~ Name$ cat .bash_profile This command will then show you whats set (ex.    PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin)

Terminal settings

If terminal is open check your preferences (Terminal -> preferences). Make sure the "When creating a new Terminal window" settings are set to "Execute this command (specify complete path):" with '/bin/bash' in the text box.


To install Readline open a terminal window and type these commands one by one:

 curl -O
 tar xzvf readline-5.1.tar.gz
 cd readline-5.1
 ./configure --prefix=/usr/local
 sudo make install
 cd ..


To install RubyGems open a terminal window (or keep using the one you've been using) and use these commands:

curl -O
tar xzvf rubygems-0.9.0.tgz
cd rubygems-0.9.0
sudo ruby setup.rb
cd ..


To install RubyGems open a terminal window (or keep using the one you've been using) and use this command:

sudo gem install rails -v 1.2.6 --include-dependencies

And also install RedCloth:

sudo gem install redcloth


You probably also want to install SVN (a.k.a. Subversion). I used this link, and the download/install was pretty straight forward.

For OSX try this quick install package: codingmonkeys Its Subversion-1.4.3.pkg

Set up the database

Assuming you have successfully installed mx you'll need to set up your database. Migrate your terminal to the 'db' directory. This command will likely do it:

cd ~/mx/trunk/db 

from db directory use these commands (you should have secured your MySQL first):

mysql -u root -p

then type these commands one by one in MySQL (commands always have to end in ';'):

GRANT ALL PRIVILEGES ON mx_development.* TO 'mx'@'localhost' IDENTIFIED BY 'MmmXxx';
create database mx_development;
use mx_development;
source tables.sql;

For the last command make sure you are in the directory that contains 'tables.sql'. If you can get a copy of data that's already in use you can set it up by quitting MySQL and then, in your terminal window type:

cd <path to mx root>/db 
rake restore file=data.sql (or whatever the datafile name is)
Personal tools