ruby on rails - Cannot migrate on Heroku -


i'd migrate database production environment on heroku.

i typed following code, got error. have no idea do. i'm looking forward advice. thank kindness.

$ heroku run rake db:migrate  running `rake db:migrate --trace` attached terminal... up, run.2338 rake aborted! loaderror: libruby.so.2.2: cannot open shared object file: no such file or directory - /app/vendor/bundle/ruby/2.2.0/gems/pg-0.18.2/lib/pg_ext.so /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require' /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `block in require' /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency' /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require' /app/vendor/bundle/ruby/2.2.0/gems/pg-0.18.2/lib/pg.rb:4:in `<top (required)>' /app/vendor/bundle/ruby/2.2.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `require' /app/vendor/bundle/ruby/2.2.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `block (2 levels) in require' /app/vendor/bundle/ruby/2.2.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `each' /app/vendor/bundle/ruby/2.2.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `block in require' /app/vendor/bundle/ruby/2.2.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `each' /app/vendor/bundle/ruby/2.2.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `require' /app/vendor/bundle/ruby/2.2.0/gems/bundler-1.9.7/lib/bundler.rb:134:in `require' /app/config/application.rb:7:in `<top (required)>' /app/rakefile:4:in `require' /app/rakefile:4:in `<top (required)>' /app/vendor/ruby-2.2.2/lib/ruby/2.2.0/rake/rake_module.rb:28:in `load' /app/vendor/ruby-2.2.2/lib/ruby/2.2.0/rake/rake_module.rb:28:in `load_rakefile' /app/vendor/ruby-2.2.2/lib/ruby/2.2.0/rake/application.rb:689:in `raw_load_rakefile' /app/vendor/ruby-2.2.2/lib/ruby/2.2.0/rake/application.rb:94:in `block in load_rakefile' /app/vendor/ruby-2.2.2/lib/ruby/2.2.0/rake/application.rb:176:in `standard_exception_handling' /app/vendor/ruby-2.2.2/lib/ruby/2.2.0/rake/application.rb:93:in `load_rakefile' /app/vendor/ruby-2.2.2/lib/ruby/2.2.0/rake/application.rb:77:in `block in run' /app/vendor/ruby-2.2.2/lib/ruby/2.2.0/rake/application.rb:176:in `standard_exception_handling' /app/vendor/ruby-2.2.2/lib/ruby/2.2.0/rake/application.rb:75:in `run' /app/bin/rake:8:in `<main>' 

have tried running migration directly bash inside heroku server? if not, try following...

heroku run bash --app your_app_name_goes_here bundle exec rake db:migrate 

first line of code opens bash command terminal , second 1 migrates db usual.


this not suggested solution. but, in case not care losing data in database, can try , reset database first , try again. again, don't unless willing lose existing data!

heroku pg:reset database heroku run rake db:migrate 

however can perform via bash before.

hope helps out.


Comments

Popular posts from this blog

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -