Textmate/ROR configuration

1. To make the file can be opened in the terminal using mate filename
sudo ln -s /Applications/TextMate.app/Contents/Resources/mate /usr/bin/
2. .tmTheme files are under /Applications/TextMate.app/Contents/SharedSupport/Themes
3. Command + shift + t go to specific function/method
-----------------------

Install ruby/rubygems/rails on snow leopard(MAC OS 10.6.4)

1. Set the Path
mate ~/.profile
Add the following to the last line:
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
Then check if it has been updated:
source ~/.profile
echo $PATH
If /usr/local/bin is at the beginning of the line, it is done otherwise repeat the above steps.

2. Download ruby/rubygems

mkdir ~/src
cd ~/src

curl -O ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p174.tar.gz
curl -O http://files.rubyforge.vm.bytemark.co.uk/rubygems/rubygems-1.3.5.tgz

3. Install Ruby

tar xzvf ruby-1.8.7-p174.tar.gz
cd ruby-1.8.7-p174
./configure --enable-shared --enable-pthread CFLAGS=-D_XOPEN_SOURCE=1
make
sudo make install
cd ..
Check if ruby is installed: which ruby
if it returns : /usr/local/bin/ruby then done

4. Install rubygems
tar xzvf rubygems-1.3.5.tgz
cd rubygems-1.3.5
sudo /usr/local/bin/ruby setup.rb
cd ..

5. Install rails
sudo gem install rails

6. Install MySQL
sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql

7. Install Mongrel
sudo gem install mongrel --include-dependencies


---------------------------------
Create a test app
1. rails testapp
cd testapp
script/server

http://localhost:3000
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值