MeuMySQL Blog is now at http://blog.mdnsolutions.com/.

Sunday, December 16, 2012

Installing Ruby on Rails on MAC OS X


Hi fellas! Today I felt to get started with Ruby on Rails and with those steps below I've set up my environment. So, I'm on a MAC OS X 10.7.5 64 bits and it worked pretty well for me.




Installing 

First of all I did the download of the RVM and run it on my machine.

$ \curl -L https://get.rvm.io | bash -s stable --ruby

Tuesday, December 4, 2012

Troubles with multiple hosts on Apache Mac OS X

Hi folks! I was running Apache on my Mac OS X, and in some point I needed to set up other virtual host for one of my projects. However everytime I've tried to access the new virtual host I was getting only the first one I had on my /etc/apache2/httpd.config. 

I sorted it out doing the steps below:


Edit  /etc/apache2/httpd.conf uncomment the vhost file like:
# Virtual hosts
Include /private/etc/apache2/extra/httpd-vhosts.conf

Then edit the file /private/etc/apache2/extra/httpd-vhosts.conf  adding your virtual hosts:
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80

<VirtualHost *:80>
    DocumentRoot "/Library/WebServer/Documents"
    ServerName localhost
</VirtualHost>


<VirtualHost *:80> 
  <Directory /Users/<youruser>/Sites/vhOne>
      AllowOverride All 
  </Directory> 
     DocumentRoot "/Users/<youruser>/Sites/vhOne"
     ServerName vhOne.local
</VirtualHost>

and be sure that you add to your /etc/hosts file as below:
127.0.0.1   vhOne.local
I hope it is userful. See ya around!