六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 46|回复: 0

Textmate/ROR configuration

[复制链接]

升级  30%

25

主题

25

主题

25

主题

秀才

Rank: 2

积分
95
 楼主| 发表于 2013-1-15 02:23:07 | 显示全部楼层 |阅读模式
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
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表