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 rake abort

opened this issue · comments

My app works fine in dev. It uploads to Heroku and runs fine until I run
heroku run rake db:migrate. Not sure what this is. I looked at a couple of ideas on Stack Overflow but they did not help. Any help appreciated.

Then I get the following:
Running rake db:migrate attached to terminal... up, run.1298
rake aborted!
cannot load such file -- teaspoon/console
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in require' /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:inblock in require'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in load_dependency' /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:inrequire'
/app/lib/tasks/spec.rake:2:in <top (required)>' /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:inload'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in block in load' /app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:inload_dependency'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in load' /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/engine.rb:425:inblock in load_tasks'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/engine.rb:425:in each' /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/engine.rb:425:inload_tasks'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/application.rb:145:in load_tasks' /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:inmethod_missing'
/app/Rakefile:7:in <top (required)>' /app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/rake_module.rb:25:inload'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in load_rakefile' /app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:589:inraw_load_rakefile'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:89:in block in load_rakefile' /app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:160:instandard_exception_handling'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:88:in load_rakefile' /app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:72:inblock in run'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:160:in standard_exception_handling' /app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:70:inrun'
(See full trace by running task with --trace)

Here is my Gem File:
source 'https://rubygems.org'
gem 'rails', '3.2.13'
gem 'sqlite3', :group => :development
gem 'thin', :group => :production
group :assets do
gem 'sass-rails', '> 3.2.3'
gem 'coffee-rails', '
> 3.2.1'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
gem "rspec-rails", ">= 2.12.2", :group => [:development, :test]
gem "database_cleaner", ">= 1.0.0.RC1", :group => :test
gem "email_spec", ">= 1.4.0", :group => :test
gem "cucumber-rails", ">= 1.3.1", :group => :test, :require => false
gem "launchy", ">= 2.2.0", :group => :test
gem "capybara", ">= 2.0.3", :group => :test
gem "factory_girl_rails", ">= 4.2.0", :group => [:development, :test]
gem "teaspoon", ">= 0.7.4", :group => [:development, :test]
gem "bootstrap-sass", ">= 2.3.0.0"
gem "devise", ">= 2.2.3"
gem "cancan", ">= 1.6.9"
gem "rolify", ">= 3.2.0"
gem "simple_form", ">= 2.1.0"
gem "stripe", ">= 1.7.11"
gem "stripe_event", ">= 0.4.0"
gem "quiet_assets", ">= 1.0.2", :group => :development
gem "figaro", ">= 0.6.3"
gem "better_errors", ">= 0.7.2", :group => :development
gem "binding_of_caller", ">= 0.7.1", :group => :development, :platforms => [:mri_19, :rbx]
gem 'pg', :group => :production
gem 'rails_12factor', group: :production
gem 'heroku'
ruby '2.0.0'

You could try RAILS_ENV=production rake db:migrate

Do I need to put ‘heroku’ before that?

On Apr 5, 2014, at 9:49 PM, Daniel Kehoe notifications@github.com wrote:

You could try RAILS_ENV=production rake db:migrate


Reply to this email directly or view it on GitHub.

It says to add this to ‘spec.rake’
Is that a file? I don’t see that file.

On Apr 5, 2014, at 9:51 PM, Daniel Kehoe notifications@github.com wrote:

Yes.

Also did you see this?
http://stackoverflow.com/questions/21097812/heroku-migrate-command-failing


Reply to this email directly or view it on GitHub.

May I recommend you do this, and see what happens :

$ RAILS_ENV=development
$ rake db:reset
$ rake db:test:prepare
$ cucumber                       ( if you are using Cucuber, and I see you are )
$ rspec spec                     ( if yuo are using Rspec, and I see you are )

The first step makes sure your environment is set to Development,
and is usually an unnecessary step, as you are in development when you use Terminal to work the app.

The rake db:reset step will reset your database, and reseed your seed data, and this step will give you a clean start.
The rake db:test:prepare step will prepare the app for testing ( i don't know everything it does), and
The cucumber step will tell you the health of your site, as you are writing tests to build your site.
The rspec spec step will run rspec, and there ya go. It looks like your error will definitely show up here.

You will see what is wrong.

I do these first two steps below every time before I do a push to git and heroku ..

$ rake db:reset
$ rake db:test:prepare
$ cucumber                         : fix as needed
$ rspec spec                       : fix as needed
$ rake assets:clobber          : see note below
$ RAILS_ENV=production bundle exec rake assets:precompile
$ git push origin master
$ git push heroku master
$ heroku restart
$ close your terminal to get out of production or
$ RAILS_ENV=development

Regardng the rake assets:clobber step ..
If I know I am making changes to assets, new javascript, new css, etc ..
I always clobber assets before I begin, so i can see the changes in action and ..
so the changes in assets can be precompiled anew.
Usually, after a successful push, I almost always clobber assets right off,
and change my applicantion.yml Stripe Keys, if you are using Strip .. back to Test.
Before I push, I change them back to Live.

Hope this helps,

Will I Am
https://github.com/kathyonu

On Apr 5, 2014, at 9:35 PM, 101South notifications@github.com wrote:

My app works fine in dev. It uploads to Heroku and runs fine until I run
heroku run rake db:migrate. Not sure what this is. I looked at a couple of ideas on Stack Overflow but they did not help. Any help appreciated.

Then I get the following:
Running rake db:migrate attached to terminal... up, run.1298
rake aborted!
cannot load such file -- teaspoon/console
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in require'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:inblock in require'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in load_dependency'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:inrequire'
/app/lib/tasks/spec.rake:2:in <top (required)>'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:inload'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in block in load'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:inload_dependency'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in load'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/engine.rb:425:inblock in load_tasks'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/engine.rb:425:in each'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/engine.rb:425:inload_tasks'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/application.rb:145:in load_tasks'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:inmethod_missing'
/app/Rakefile:7:in <top (required)>'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/rake_module.rb:25:inload'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in load_rakefile'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:589:inraw_load_rakefile'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:89:in block in load_rakefile'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:160:instandard_exception_handling'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:88:in load_rakefile'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:72:inblock in run'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:160:in standard_exception_handling'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:70:inrun'
(See full trace by running task with --trace)

Here is my Gem File:
source 'https://rubygems.org'
gem 'rails', '3.2.13'
gem 'sqlite3', :group => :development
gem 'thin', :group => :production
group :assets do
gem 'sass-rails', '> 3.2.3'
gem 'coffee-rails', '
> 3.2.1'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
gem "rspec-rails", ">= 2.12.2", :group => [:development, :test]
gem "database_cleaner", ">= 1.0.0.RC1", :group => :test
gem "email_spec", ">= 1.4.0", :group => :test
gem "cucumber-rails", ">= 1.3.1", :group => :test, :require => false
gem "launchy", ">= 2.2.0", :group => :test
gem "capybara", ">= 2.0.3", :group => :test
gem "factory_girl_rails", ">= 4.2.0", :group => [:development, :test]
gem "teaspoon", ">= 0.7.4", :group => [:development, :test]
gem "bootstrap-sass", ">= 2.3.0.0"
gem "devise", ">= 2.2.3"
gem "cancan", ">= 1.6.9"
gem "rolify", ">= 3.2.0"
gem "simple_form", ">= 2.1.0"
gem "stripe", ">= 1.7.11"
gem "stripe_event", ">= 0.4.0"
gem "quiet_assets", ">= 1.0.2", :group => :development
gem "figaro", ">= 0.6.3"
gem "better_errors", ">= 0.7.2", :group => :development
gem "binding_of_caller", ">= 0.7.1", :group => :development, :platforms => [:mri_19, :rbx]
gem 'pg', :group => :production
gem 'rails_12factor', group: :production
gem 'heroku'
ruby '2.0.0'


Reply to this email directly or view it on GitHub.

I tried all of this. There are no issues with cucumber or rspec spec. No errors. After trying everything you suggested I still get the error when running 'heroku run rake db:migrations’

Mark

On Apr 6, 2014, at 8:33 AM, kathyonu notifications@github.com wrote:

May I recommend you do this, and see what happens :

$ RAILS_ENV=development
$ rake db:reset
$ rake db:test:prepare
$ cucumber ( if you are using Cucuber, and I see you are )
$ rspec spec ( if yuo are using Rspec, and I see you are )

The first step makes sure your environment is set to Development,
and is usually an unnecessary step, as you are in development when you use Terminal to work the app.

The rake db:reset step will reset your database, and reseed your seed data, and this step will give you a clean start.
The rake db:test:prepare step will prepare the app for testing ( i don't know everything it does), and
The cucumber step will tell you the health of your site, as you are writing tests to build your site.
The rspec spec step will run rspec, and there ya go. It looks like your error will definitely show up here.

You will see what is wrong.

I do these first two steps below every time before I do a push to git and heroku ..

$ rake db:reset
$ rake db:test:prepare
$ cucumber : fix as needed
$ rspec spec : fix as needed
$ rake assets:clobber : see note below
$ RAILS_ENV=production bundle exec rake assets:precompile
$ git push origin master
$ git push heroku master
$ heroku restart
$ close your terminal to get out of production or
$ RAILS_ENV=development

Regardng the rake assets:clobber step ..
If I know I am making changes to assets, new javascript, new css, etc ..
I always clobber assets before I begin, so i can see the changes in action and ..
so the changes in assets can be precompiled anew.
Usually, after a successful push, I almost always clobber assets right off,
and change my applicantion.yml Stripe Keys, if you are using Strip .. back to Test.
Before I push, I change them back to Live.

Hope this helps,

Will I Am
https://github.com/kathyonu

On Apr 5, 2014, at 9:35 PM, 101South notifications@github.com wrote:

My app works fine in dev. It uploads to Heroku and runs fine until I run
heroku run rake db:migrate. Not sure what this is. I looked at a couple of ideas on Stack Overflow but they did not help. Any help appreciated.

Then I get the following:
Running rake db:migrate attached to terminal... up, run.1298
rake aborted!
cannot load such file -- teaspoon/console
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in require'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:inblock in require'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in load_dependency'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:inrequire'
/app/lib/tasks/spec.rake:2:in <top (required)>'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:inload'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in block in load'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:inload_dependency'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in load'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/engine.rb:425:inblock in load_tasks'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/engine.rb:425:in each'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/engine.rb:425:inload_tasks'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/application.rb:145:in load_tasks'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:inmethod_missing'
/app/Rakefile:7:in <top (required)>'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/rake_module.rb:25:inload'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in load_rakefile'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:589:inraw_load_rakefile'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:89:in block in load_rakefile'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:160:instandard_exception_handling'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:88:in load_rakefile'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:72:inblock in run'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:160:in standard_exception_handling'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.0.4/lib/rake/application.rb:70:inrun'
(See full trace by running task with --trace)

Here is my Gem File:
source 'https://rubygems.org'
gem 'rails', '3.2.13'
gem 'sqlite3', :group => :development
gem 'thin', :group => :production
group :assets do
gem 'sass-rails', '> 3.2.3'
gem 'coffee-rails', '
> 3.2.1'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
gem "rspec-rails", ">= 2.12.2", :group => [:development, :test]
gem "database_cleaner", ">= 1.0.0.RC1", :group => :test
gem "email_spec", ">= 1.4.0", :group => :test
gem "cucumber-rails", ">= 1.3.1", :group => :test, :require => false
gem "launchy", ">= 2.2.0", :group => :test
gem "capybara", ">= 2.0.3", :group => :test
gem "factory_girl_rails", ">= 4.2.0", :group => [:development, :test]
gem "teaspoon", ">= 0.7.4", :group => [:development, :test]
gem "bootstrap-sass", ">= 2.3.0.0"
gem "devise", ">= 2.2.3"
gem "cancan", ">= 1.6.9"
gem "rolify", ">= 3.2.0"
gem "simple_form", ">= 2.1.0"
gem "stripe", ">= 1.7.11"
gem "stripe_event", ">= 0.4.0"
gem "quiet_assets", ">= 1.0.2", :group => :development
gem "figaro", ">= 0.6.3"
gem "better_errors", ">= 0.7.2", :group => :development
gem "binding_of_caller", ">= 0.7.1", :group => :development, :platforms => [:mri_19, :rbx]
gem 'pg', :group => :production
gem 'rails_12factor', group: :production
gem 'heroku'
ruby '2.0.0'


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.

Ask Heroku support and tell us what you learn.

LOL, Daniel and his wisdom in not telling me the answer.
Sometimes I feel foolish. The answer I had already seen when I was pointed to it at:
http://stackoverflow.com/questions/21097812/heroku-migrate-command-failing

But with not a lot of experience in testing I did a search in the files for ‘spec.rake’ and came up with nothing on that file. But the file was there as heroku support pointed me right to it. Not sure if the new Textmate beta I am running still needs some work or it I need some work. Probably the later!!

Anyway, after adding that simple “if” statement to the file all is well and working as it should on Heroku.
Thanks Daniel for making me learn something new today.

On Apr 6, 2014, at 11:03 AM, Daniel Kehoe notifications@github.com wrote:

Ask Heroku support and tell us what you learn.


Reply to this email directly or view it on GitHub.

Glad you got it resolved and increased your knowledge in the process.