简体   繁体   中英

something wrong with my rails app deploy to heroku

I do my deploy as the heroku guide.

But when I use commend 'heroku rake db:migrate', then present these errors:

Running rake db:migrate attached to terminal... up, run.1
(in /app)
rake aborted!
no such file to load -- test/unit/error
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
/app/.gems/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in `block in require'
/app/.gems/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in `new_constants_in'
/app/.gems/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in `require'
/app/.gems/gems/activesupport-2.2.2/lib/active_support/deprecation.rb:224:in `<top (required)>'
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
/app/.gems/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in `block in require'
/app/.gems/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in `new_constants_in'
/app/.gems/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in `require'
/app/.gems/gems/activesupport-2.2.2/lib/active_support.rb:37:in `<top (required)>'
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
/app/.gems/gems/rails-2.2.2/lib/tasks/misc.rake:11:in `<top (required)>'
/app/.gems/gems/rails-2.2.2/lib/tasks/rails.rb:4:in `load'
/app/.gems/gems/rails-2.2.2/lib/tasks/rails.rb:4:in `block in <top (required)>'
/app/.gems/gems/rails-2.2.2/lib/tasks/rails.rb:4:in `each'
/app/.gems/gems/rails-2.2.2/lib/tasks/rails.rb:4:in `<top (required)>'
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
/app/Rakefile:10:in `<top (required)>'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2373:in `load'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2373:in `raw_load_rakefile'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2006:in `load_rakefile'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:1991:in `run'
/usr/ruby1.9.2/bin/rake:31:in `<main>'
jason@jason-VirtualBox:~/work/depot$ rake db:migrate
(in /home/jason/work/depot)

I visit my app in heroku, it presents the error:

Application Error
An error occurred in the application and your page could not be served. Please try again in a few moments.

If you are the application owner, check your logs for details.

Try adding pg gem in gem file for the production environment and execute the below command

 $ bundle install --without production

Since Heroku uses Postgresql databases we must use this way. Hope helps you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM