首页 > 编程语言 >Ruby_rails 开发环境配置项 figaro 或者 dotenv

Ruby_rails 开发环境配置项 figaro 或者 dotenv

时间:2023-04-03 15:05:54浏览次数:45  
标签:publishable pusher rails figaro live stripe key dotenv


https://rubygems.org/gems/figaro

 

https://github.com/bkeepers/dotenv

 

figaro 用法:

bundle exec figaro install

然后就会生成 config/application.yml

# Add configuration values here, as shown below.
#
# pusher_app_id: "294"
# pusher_key: 7381a978f7dd7f79a1117
# pusher_secret: abdc3b896a0ffb85d7373
# stripe_api_key: sk_test_2J0l093xO7yW72XUYJHE4Dv2r
# stripe_publishable_key: pk_test_ro9jV5SN2wGb1yYlQfzG17LHK
#
# production:
#   stripe_api_key: sk_live_EeHnL644i16zo4Iyq4v1KdV9H
#   stripe_publishable_key: pk_live_9lcthxp2SIHbGwmdO941O1XVU

使用就是ENV['key']

标签:publishable,pusher,rails,figaro,live,stripe,key,dotenv
From: https://blog.51cto.com/u_15976398/6166422

相关文章

  • rails header 传参数开发环境正式环境区别
    rails开发环境api传递access_token参数  在controller用 request.headers["HTTP_ACCESS_TOKEN"]可获取到值。但是在生产环境却获取不到值了。原因是生产环境head......
  • 环境变量与git的配合实现dotenv
    事由最近在开发淘宝客返利程序的后台服务时发现对接到淘宝联盟的appKey和secret是极为重要的假设这两串数字被恶意盗用轻则消耗平台你的流量,重则封号所以就需要将重要......
  • Linux export environment variables & dotenv read .env file All In One
    Linuxexportenvironmentvariables&dotenvread.envfileAllInOneNode.jsprocess.envoverridebugterminalcommandoverride.envfilebugwhythetermi......
  • 【Ruby on Rails全栈课程】课程目录
    【前言】我还是编程小白的时候,开始接触Ruby,当时学习资料只有ruby实战圣经,虽然讲的已经很详细了,但是对于小白状态的我,很多地方还是很模糊,很多地方需要自己摸索,走了不少弯路。......
  • vim rails
    https://ruby-china.org/topics/4478/*CurrentfileAlternatefileRelatedfile*modelunittestschemadefinition*controller(inmethod)functional......
  • rails snippets
    snippetartassert_redirected_to${1:action}:'${2:index}'snippetartnpassert_redirected_to${1:parent}_${2:child}path(${3:@$1},${0:@$2})snippetartnppass......
  • vim rails 操作翻译
    rails.vimThisisamassive(inagoodway)VimpluginforeditingRubyonRailsapplications.EasynavigationoftheRailsdirectorystructure.gfconsider......
  • ruby on rails 常用命令汇总
    Rails常用的命令汇总:1、railsnewrails_4.2.17_newmyapprailsnewdemo--skip-test-unitorrailsnewdemo-Trailsnewdemo-dmysql-Trailsgeneraterspec:......
  • UVA 514-Rails
    原题Vjudge题目大意给定一个入栈序列\([1,2,3....,n]\),判断出栈序列\([a_{1},a_{2}.....a_{n}]\)是否合法解题思路这道题目我们可以用一个栈与双指针结合的算法我们设......
  • grails的controller和action那点事---远程调试groovy代码
     最近由于项目需要,用到了grails,这玩意确实好用,生产率高有类型python的速度与简洁。仅第一印象,用的还不深入,说的不对请轻拍。遇到的几个问题:1.groovy远程调试玩Java的应该......