RailsApps / rails-stripe-membership-saas

An example Rails 4.2 app with Stripe and the Payola gem for a membership or subscription site.

Home Page:http://railsapps.github.io/rails-stripe-membership-saas

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Heroku db migration error

laurenierullo opened this issue · comments

Everything works fine locally, and the homepage loads on heroku just fine. But when I click "log in" I get an error page. I followed all instructions and when I migrate I get the issue below.

$ heroku run rake db:migrate
Running rake db:migrate attached to terminal... up, run.7585
rake aborted!
cannot load such file -- teaspoon/console

In the heroku app when I click "log in" on the homepage and then look at heroku logs it says:

ActiveRecord::StatementInvalid (PG::UndefinedTable: ERROR: relation "users" does not exist
LINE 5: WHERE a.attrelid = ' "users" '::regclass
^

Please help!

Is the teaspoon gem in a test/development group? Should look something like:

gem "teaspoon", ">= 0.7.4", :group => [:development, :test]

Yep. It looks like this:

gem "teaspoon", ">= 0.7.4", :group => [:development, :test]

I may have found it. Look in

lib/tasks/spec.rake

Line 2 should only require "teaspoon/console" if the environment is test or development. So change line 2 to something like

require "teaspoon/console" if %w[development test].include?(Rails.env)

IT WORKED! Thank you for your quick responses. :D

No problem, happy I could help.