Heroku Jammit GEM 带有最新的 Heroku Gem

发布于 2024-11-08 11:41:31 字数 989 浏览 1 评论 0原文

我一直在使用以下 heroku jammit gem 进行部署:

https://github.com/kylejginavan/heroku_jammit/blob/master/lib/heroku_jammit.rb

在夜间部署期间,heroku 让我更新了我的 heroku gem,然后它破坏了这个 jammit gem。我现在收到以下错误:

===== Deploying assets for  to heroku...

 !  Invalid path.
 !  Syntax is: [email protected]:<app>.git where <app> is your app's name

fatal: The remote end hung up unexpectedly
[FAIL]
===== Done...
===== Deleting compiled assets...[OK]
===== Commiting deleted assets...[OK]
===== Done...

在heroku_jammit gem '/lib/heroku_jammit.rb'

line 84: run "git push [email protected]:#{@app}.git #{branch}:master"

关于如何更新此行以使用新的heroku gem 有什么建议吗?

谢谢

I've been using the following heroku jammit gem for deploying:

https://github.com/kylejginavan/heroku_jammit/blob/master/lib/heroku_jammit.rb

During a nightly deployment, heroku had me update my heroku gem, which then broke this jammit gem. I now get the following error:

===== Deploying assets for  to heroku...

 !  Invalid path.
 !  Syntax is: [email protected]:<app>.git where <app> is your app's name

fatal: The remote end hung up unexpectedly
[FAIL]
===== Done...
===== Deleting compiled assets...[OK]
===== Commiting deleted assets...[OK]
===== Done...

In the heroku_jammit gem '/lib/heroku_jammit.rb'

line 84: run "git push [email protected]:#{@app}.git #{branch}:master"

Any suggestions on how to update this line to work with the new heroku gem?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

み青杉依旧 2024-11-15 11:41:31

Heroku gem 的 API 发生了变化。在 2.0 之前,@app 是使用 attr_reader 定义的。在2.0+版本中它是一个方法。解决方法是将实例变量对 @app 的调用更改为对 app 的方法调用。

我们在已接受的拉取请求中修复了此问题。

The API of the Heroku gem changed. Before 2.0 @app was defined with an attr_reader. In version 2.0+ it's a method. The fix is to change the instance variable call to @app to a method call to app.

We fixed this in our pull request which has been accepted.

别再吹冷风 2024-11-15 11:41:31

我也有同样的问题。我的解决方案既困难又肮脏,但我发现 @app 不再定义(在插件内)。如果你有一个远程阶段和一个生产头,heroku 总是问我:请添加 -app [app-name] 来指定......我尝试过,它对我有用......

  1. 该插件存在于你的用户中 -主文件夹: ~/.heroku/plugins/heroku_jammit
  2. 转到 ~/.heroku/plugins/heroku_jammit/lib/heroku_jammit.rb 并添加以下行(靠近 78):
    heroku_jammit.rb:

    定义部署

    如果没有安装则失败!

    是_root吗?

    branch = set_branch

写完后

@app=@options[:app]

:你可以提交:

heroku jammit:deploy --app [your-app-name]

我在rails 2.3.11,ruby-1.8.7-p334(带有rvm)上 - 在开发中一切正常。
在heroku 上,我遇到了assets.yml 错误。我尝试了从 0.4.4 到现在的所有 jammit 版本,但我坚持并现在寻找新的解决方案。

祝你好运....

I had the same problem. My solution is hard and dirty, but I found out, that @app is not defined anymore(inside the plugin). If you have a remote stage and a production head, heroku always ask me: please add -app [app-name] to specify....I tried it and it worked for me....

  1. the plugin lives in your users-home-folder: ~/.heroku/plugins/heroku_jammit
  2. goto ~/.heroku/plugins/heroku_jammit/lib/heroku_jammit.rb and add following line(near 78):
    heroku_jammit.rb:

    def deploy

    fail_if_jammit_not_installed!

    is_root?

    branch = set_branch

after this write:

@app=@options[:app]

and you can commit with:

heroku jammit:deploy --app [your-app-name]

I'm on rails 2.3.11, ruby-1.8.7-p334 (with rvm) - in development everything works fine.
On heroku I get erros with assets.yml. I tried all jammit version from 0.4.4 to now, but I stuck and look now for a new solution.

Good luck....

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文