RailsApps / rails-stripe-membership-saas

An example Rails 4.2 app with Stripe and the Payola gem for a membership or subscription site.
http://railsapps.github.io/rails-stripe-membership-saas
1.14k stars 232 forks source link

Can't set Heroku ENV variables with 'rake figaro:heroku' #46

Closed DanielKehoe closed 11 years ago

DanielKehoe commented 11 years ago

According to our README document, we should be able to use the figaro gem to set environment variables on Heroku. But we get an error:

$ rake figaro:heroku
rake aborted!
can't convert true into String

This figaro gem issue appears to be the problem: https://github.com/laserlemon/figaro/issues/20

There's a pending pull request but no action on it in over a month.

DanielKehoe commented 11 years ago

The workaround is to set environment variables on Heroku with heroku config:add.

$ heroku config:add 'ROLES=[admin, user, VIP]'
$ heroku config:add ADMIN_NAME='First User' ADMIN_EMAIL='user@example.com' ADMIN_PASSWORD='please'
$ heroku config

Then run:

$ heroku run rake db:migrate
$ heroku run rake db:seed
mchung commented 11 years ago

Ran into this problem. Started using foreman's per-project environment variables? http://blog.akash.im/per-project-environment-variables-with-forema. Working out pretty well so far.

DanielKehoe commented 11 years ago

Resolved with newest Figaro gem release.