石锅拌饭

打开一个rails工程需要几步

by Robin Lu on Jan.24, 2007, about ,

通常,在mac下,打开一个rails工程,开始工作,要经历以下步骤:

  1. 用TextMate打开rails工程。
  2. 打开iTerm。
  3. 运行gem_server,为查帮助做好准备。
  4. 进入rails工程的目录,运行mongrel_rails start。
  5. 在iTerm里再开一个tab,进入rails工程目录,运行tail -f log/development.log。
  6. 打开Safari,开两个tab,一个打开http://localhost:8808看gem帮助,一个打开http://0.0.0.0:3000。

比把大象放到冰箱里复杂多了。
做了一个TextMate Bundle的命令,用TextMate打开rails工程后,开一个rb文件(不打开文件没法运行bundle命令),然后按苹果-ctrl-o,从2到6就自动帮你做了。另外还加了一个命令,只要按苹果-ctrl-l就可以直接唤出那个显示log的窗口。这下方便多了。
这个Bundle缺省认为你使用iTerm和Mongrel。
点击下载打开rails工程的TextMate Bundle

:,

2 Comments for this entry

2 Trackbacks / Pingbacks for this entry

  • links for 2007-04-06 « /tmp

    [...] 打开一个rails工程需要几步 (tags: Rails Textmate) [...]

  • TomLion » Robin的TextMate bundle的一些修正

    [...] Robin的原始版本在这 不知道是不是TextMate的版本问题,Robin提供的TextMate bundle在我的电脑上安装失败,所以我借用了Robin的代码重做了一个TextMate bundle,功能一样。 还加入了这篇文章的Rails Console Command, 修改了一下,因为也不能正常工作。去掉了其中第11行的 . ~/.profile 另外需要提醒的是因为bundle中使用了AppleScript,所以需要打开系统参数中Universal Access的Enable access for assistive devices,否则bundle不能打开Safari. 下载bundle [...]

Search

Archives

Browse by tags

agile apple blog book design ecto extension firefox git google hack ichm iphone keyword life mac madfox movie nonsense opensource plugin pm ruby rubyonrails sns software startup wordpress work 财帮子