Textmate 和 Rails (Rails3) 不适用于“调用生成脚本”
问题:
用于在 Textmate 中生成脚本包的 Rails UI 界面无法正常工作。
描述:
在 Rails 文档中:
“Bundles”> “Ruby on Rails”> “调用生成脚本”并选择“控制器”,然后输入
“index”> “索引”并提交。
出现一个窗口,告诉我:“完成生成控制器”。
但是,当我浏览目录时没有什么新内容已创建。
截图:
我把生成过程中发生的情况截图一下:
http://img152.imageshack.us/i/capturedcran20110201003.png/
版本:
ruby -v: ruby 1.8.7 (2009-06-12 补丁级别 174) [universal-darwin10.0]
Rails -v:Rails 3.0.3
我按照本教程在 RVM 环境中尝试了相同的操作:
(http://rvm.beginrescueend.com/integration/textmate/)
结果是一样的。
问候,
纪尧姆.
Problem:
The rails UI interface for generating scripts bundle in Textmate is not working.
Description:
In a rails document:
"Bundles"> "Ruby on Rails"> "Call Generate Script" and choose "Controller" then type
"index" > "index" and submit.
A window appears telling me: "Done Generating controller".
Yet when I browse through my directories nothing new has been created.
Screenshot:
I take a screenshot of what happens during the generation process:
http://img152.imageshack.us/i/capturedcran20110201003.png/
Versions:
ruby -v: ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]
rails -v: Rails 3.0.3
I tried the same with an RVM environment by following this tutorial:
(http://rvm.beginrescueend.com/integration/textmate/)
The result is the same.
Regards,
Guillaume.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您必须稍微修改该包才能使其与 Rails 3 生成脚本一起使用。看看我在 GitHub 上的修改:
https://github.com/dhoelzgen/ruby- on-rails-tmbundle
You have to slightly modifiy the bundle to make it work with the Rails 3 generate scripts. Have a look at my modifications on GitHub:
https://github.com/dhoelzgen/ruby-on-rails-tmbundle
那里的错误表明“没有这样的文件或目录——脚本/生成”。这让我相信您正在使用 Rails 3,其中命令现在为
railsgenerate
或简称为railsg
。升级您的 Ruby on Rails TextMate 捆绑包(按照 GitHub 页面上的说明)或或者从命令行运行rails gcontroller [name]
。The error there says that there's "No such file or directory -- script/generate". This leads me to beleive that you're using Rails 3, where the command is now
rails generate
orrails g
for short. Upgrade your Ruby on Rails TextMate bundle (follow the instructions on the GitHub Page) or alternatively runrails g controller [name]
from the command line.