如何在heroku上工作当地的宝石? [英] How to get working a local gem on heroku?

查看:84
本文介绍了如何在heroku上工作当地的宝石?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



它位于vendor / gems / declarative_authorization之下。


$在我的RoR应用程序中有一个修改后的宝石声明授权版本。 b $ b

我的gemfile有

  gemdeclarative_authorization,'= 0.5.5',路径:vendor / gems / declarative_authorization /

它在部署和测试方面效果很好,但是当我尝试推向heroku时,在运行 bundle install 之后,它给我一个错误,因为它找不到那个gem提供的函数。特别是找不到方法 filter_access_to

heroku restart 不能解决问题。

解决方案

我终于找到了解决方案。



:git代替:path

  gem'gem_name','= 0.x.x',git:'git:/ /........../gem_name.git'


I have a modified version of the gem declarative authorization on my RoR app.

It's under vendor/gems/declarative_authorization.

My gemfile has

gem "declarative_authorization", '= 0.5.5', path: "vendor/gems/declarative_authorization/"

It works fine on deployment and testing but when I try to push to heroku, after it runs bundle install it gives me an error because it can't find functions provided by that gem. Specifically the method filter_access_to can't be found.

heroku restart doesn't solve the problem.

解决方案

I finally got it working.

My solution was use :git instead of :path

gem 'gem_name', '= 0.x.x', git: 'git://........../gem_name.git'

这篇关于如何在heroku上工作当地的宝石?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆