Jump to content


Forumul s-a mutat!

Aceasta este arhiva forumului MacForum.ro din perioada 2010-2014.
Noul forum poate fi accesat aici.
Conturile vechi nu mai sunt valabile pe noul forum!





Photo
- - - - -

Using Sass and Compass on a PowerPC Mac

Posted by Tudor Vedeanu , in PowerPC, Tutoriale 10 February 2013 · 776 views

sass compass powerpc ruby web development
NOTĂ: Scriu acest tutorial în engleză, pentru că s-ar putea să fie util pentru o audiență mai largă.

If you're a web developer and want to use Sass and Compass on a PowerPC Mac, read on, this may help you.

I have a 17" PowerBook G4, the very last model made by Apple, with the "hi-res" screen and upgraded to the max. Despite its age, that PowerBook is still a nice computer. Obviously is no speed demon, but I am still using it quite often for designing print and web stuff. It's running Mac OS X 10.5.8, Adobe CS4 apps, Textmate, CSSEdit, and that's enough for a more than decent workflow, especially for lightweight web coding like HTML, CSS and Javascript.

The problem is with the fancy new web stuff like Sass and Compass. For whatever reason Sass doesn't work with Ruby 1.8.6, which is the version installed by default on Leopard. So the only solution to make it work is to upgrade Ruby to a newer version.

Now, I should mention I am not a programmer. I searched the web trying to learn how to upgrade Ruby on PowerPC Macs. I did find some tutorials, but all my attempts failed because each time I tried, I had to compile something. And each time I tried compiling something, I got all kinds of errors I didn't understand.

Today I found a solution which finally worked on my PowerBook. Here is what you need to do if you're running Mac OS X Leopard 10.5.8. As I said, I am not a programmer, so I can't fully explain most of the things below. Use this tutorial at your own risk! You may break something, so be sure to have backups of all the data you care about before doing this.

1. Install Xcode 3.1.4. This is the last version of Xcode for Leopard PPC. You can find it on Apple Developer website (you'll need a free developer account). Click on Resources link at the top of the page, then under OS X click on Downloads. You'll see a page with all the downloads available, just search for Xcode 3.1.4 and you'll find it. Download the DMG (it's big, almost 1 GB) and install Xcode.

2. Our main goal is to install RVM, the Ruby Version Manager, but in order to do this, first you'll need to upgrade bash. Or at least that's what the RVM installer told me. Here's how i did it (got help from here) using the following commands in Terminal.

- Download bash 4.0:
curl -O ftp://ftp.cwru.edu/pub/bash/bash-4.0.tar.gz
- Unpack, build and install (run each command separately, one after another):
tar xzf bash-4.0.tar.gz
cd bash-4.0
./configure && make && sudo make install
- At this point, if you were lucky and didn't get any errors during the previous step, you have to configure the new shell by running something like this:
sudo bash -c "echo /usr/local/bin/bash >> /private/etc/shells"
then
chsh -s /usr/local/bin/bash
Now you should quit and reopen the Terminal, then check if the new bash is in use:
echo $SHELL
If everything worked fine, the above command will return the string "/usr/local/bin/bash". And you can check the bash version like this:
echo $BASH_VERSION
and the answer you're looking for is "4.0.0(1)-release", which means you have successfully upgraded bash!

3. Now we can install RVM:
curl -L https://get.rvm.io | bash -s stable
Pay attention at the end of the installation, you'll see a message saying something like this:
To start using RVM you need to run 'SOME_COMMAND'
Copy that SOME_COMMAND (without the apostrophes) and run it in Terminal.

4. Okay, time to build and install a new Ruby! There are several versions of Ruby available, I picked 1.9.2:
rvm install 1.9.2
This will take some time, just be patient and let it do its things. Hopefully at the end you'll get a message saying something like:
Install of ruby-1.9.2-p320 - #complete
RVM does not overwrite the Ruby which came installed with the system, so we need to activate the "new Ruby" like this:
rvm use 1.9.2
And then you can check which version of Ruby is active:
ruby -v
The answer you're looking for looks like this:
ruby 1.9.2p320 (2012-04-20 revision 35421) [powerpc-darwin9.8.0]
That's it! You have just upgraded your Ruby, and now you can install Sass and Compass! :)
gem install sass

gem install compass






Trackbacks for this entry [ Trackback URL ]

There are no Trackbacks for this entry

September 2015

M T W T F S S
 123456
78910111213
14 15 1617181920
21222324252627
282930    

Recent Comments

0 user(s) viewing

0 members, 0 guests, 0 anonymous users