新手问题 怎样打开 Heroku 的一个配置文件

discovery · 2013年03月04日 · 最后由 ashchan 回复于 2013年03月05日 · 2653 次阅读

问大家一个有关 Heroku 的小问题,我对 H 不是很熟悉。有篇文档里提到把‘config.assets.initialize_on_precompile = false’ 放到文件 config/application.rb 内。我已经创建了一个 app,请问怎样打开这个文件?

直接在 web 界面创建的 app?Heroku 的 app 代码是通过 git 来管理的,代码需要你自己 push 上去。

#1 楼 @ashchan 你好,我是在 Heroku toolbelt 下创建的,能否像 SSH 般操作?还有另外一个问题,我在同一登录账号下(电邮)有两个 APP,执行命令$ heroku apps,获取已经创建的 App 的名字。怎样选择其中一个进行操作?谢谢!

以下摘抄自 HEROKU 官网教程 $ heroku apps example collabapp [email protected] example2 App commands

App commands are typically executed from within an app’s local git working copy. The app name is automatically detected by scanning the git remotes for the current working copy, so you don’t have to specify which app to operate on explicitly. For example, the heroku apps:info command can be executed without any arguments inside the working copy:

$ cd example $ heroku apps:info === example Git Repo: [email protected]:example.git Owner: [email protected] Repo size: 960k Slug size: 512k Stack: cedar Web URL: http://example.heroku.com/

$ cd example 这个命令是怎样做得到的呢?我用 git for windows,当我试图进入我已经创建好的应用时,它提示说没有这个文件或目录

#1 楼 @ashchan 回到开头那个问题,如果我已经创建应用 discovery(discovery.heroku.com),现在想在 config/application.rb 内添加语句“config.assets.initialize_on_precompile = false”,怎样做呢?望赐教。

#3 楼 @discovery 跑这个命令拿到 app 信息:

heroku apps:info --app example

然后根据返回的信息里的 git 那行取得 git 库地址并 clone 下来。

需要 登录 后方可回复, 如果你还没有账号请 注册新账号