Heroku Jammit GEM 带有最新的 Heroku Gem
我一直在使用以下 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
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 anattr_reader
. In version 2.0+ it's a method. The fix is to change the instance variable call to@app
to a method call toapp
.We fixed this in our pull request which has been accepted.
我也有同样的问题。我的解决方案既困难又肮脏,但我发现 @app 不再定义(在插件内)。如果你有一个远程阶段和一个生产头,heroku 总是问我:请添加 -app [app-name] 来指定......我尝试过,它对我有用......
转到 ~/.heroku/plugins/heroku_jammit/lib/heroku_jammit.rb 并添加以下行(靠近 78):
heroku_jammit.rb:
定义部署
如果没有安装则失败!
是_root吗?
branch = set_branch
写完后
:你可以提交:
我在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....
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:
and you can commit with:
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....