编辑HEROKU(opentok)上的宝石定义 [英] Editing a gem definition on HEROKU (opentok)

查看:141
本文介绍了编辑HEROKU(opentok)上的宝石定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关于Heroku的快速问题。我的应用程序使用称为opentok的宝石。要在沙箱模式之外运行,该应用需要更改名为opentok.rb的gem文件中的API链接。我在本地做到了,应用程序正常工作。但是,当我部署到heroku时,该应用程序无法正常工作,因为heroku会查看我的gem文件并获取未修改的opentok gem lib,然后以sandbox模式在heroku服务器上运行我的应用程序。

有没有一种方法可以访问heroku服务器上的opentok gem文件(opentok.rb)并使用控制台中的gvim进行编辑?



谢谢!!

解决方案

对于opentok宝石,尽管,api网址可以直接作为选项传递:

  opentok = OpenTok :: OpenTokSDK.new @api_key,@api_secret, :api_url => 'https://api.opentok.com/hl'

此功能记录在spec / opentok_spec.rb文件。寻找:

  it应该可以将api网址设置为选项do 

感谢opentok宝石创造者Stijnster为我指出了它!

quick question about Heroku. My app is using a gem called opentok. To function outside of a "sandbox" mode, the app requires changing an API link in a gem file called opentok.rb. I did that locally and the app works fine. however, when I deploy to heroku, the app does not work because heroku looks at my gem file and gets the unmodified gem lib of opentok which then runs my app on the heroku server in sandbox mode.

Is there a way I can access the opentok gem file (opentok.rb) on the heroku server and edit it with gvim from a console?

Thank you!!

解决方案

For the opentok gem, though, the api url can be passed directly as an option:

opentok = OpenTok::OpenTokSDK.new @api_key, @api_secret, :api_url => 'https://api.opentok.com/hl'

this feature is documented in the spec/opentok_spec.rb file. Look for:

it "should be possible to set the api url as an option" do

Thanks to Stijnster, the opentok gem creator, for pointing it out to me!

这篇关于编辑HEROKU(opentok)上的宝石定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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