`
mcecho
  • 浏览: 39198 次
  • 性别: Icon_minigender_2
  • 来自: 北京
最近访客 更多访客>>
文章分类
社区版块
存档分类
最新评论

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
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics