I made some changes in my local development version of my app.
Then I uploaded everything using git the usual thing.
To push my changes to the database I used:
heroku db:push
I get this error on my terminal:
Sending schema
/Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:175:in `async_exec': PG::Error: ERROR: permission denied for relation temp_listings (Sequel::DatabaseError)
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:175:in `block (2 levels) in execute'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/database/logging.rb:28:in `log_yield'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:175:in `block in execute'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:158:in `check_disconnect_errors'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:175:in `execute'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:240:in `block (2 levels) in execute'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/connection_pool/threaded.rb:84:in `hold'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/database/connecting.rb:226:in `synchronize'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:240:in `block in execute'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:261:in `check_database_errors'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:238:in `execute'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/dataset/actions.rb:541:in `execute'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/adapters/postgres.rb:319:in `fetch_rows'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/dataset/actions.rb:123:in `each'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/dataset/actions.rb:449:in `single_record'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/dataset/actions.rb:457:in `single_value'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/dataset/actions.rb:202:in `get'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/sequel-3.20.0/lib/sequel/dataset/actions.rb:96:in `count'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/taps-0.3.24/lib/taps/operation.rb:570:in `block in fetch_local_tables_info'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/taps-0.3.24/lib/taps/operation.rb:569:in `each'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/taps-0.3.24/lib/taps/operation.rb:569:in `fetch_local_tables_info'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/taps-0.3.24/lib/taps/operation.rb:551:in `local_tables_info'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/taps-0.3.24/lib/taps/operation.rb:556:in `tables'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/taps-0.3.24/lib/taps/operation.rb:439:in `push_schema'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/taps-0.3.24/lib/taps/operation.rb:407:in `block in run'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/taps-0.3.24/lib/taps/operation.rb:203:in `call'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/taps-0.3.24/lib/taps/operation.rb:203:in `catch_errors'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/taps-0.3.24/lib/taps/operation.rb:405:in `run'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/taps-0.3.24/lib/taps/cli.rb:172:in `clientxfer'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.25.0/lib/heroku/command/db.rb:194:in `taps_client'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.25.0/lib/heroku/command/db.rb:35:in `push'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.25.0/lib/heroku/command.rb:148:in `run'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.25.0/lib/heroku/cli.rb:9:in `start'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.25.0/bin/heroku:16:in `<top (required)>'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/bin/heroku:19:in `load'
from /Users/AM/.rvm/gems/ruby-1.9.2-p290/bin/heroku:19:in `<main>'
Any idea how to fix this or what Im doing wrong?
I already tried running the following:
heroku pg:reset
then tried again
heroku db:push
that didnt work so I tried this
heroku run rake db:migrate
that didnt work either
so I created a new instance of my app and pushed it. Getting the same error
While convenient, using taps (what db:push/pull uses) may not replicate your data exactly and may run into errors for larger transfers. To import or export data from your production system, we highly recommend using pgbackups instead. http://devcenter.heroku.com/articles/pgbackups
Related
I'm trying to migrate from mongo DB to AWS documentDB on rails.
I changed the configuration of mongoid.yml to point to the documented instance (under hosts)
When running rake:db:mongoid:create_indexes I get the following error:
rake aborted!
Mongo::Error::NoServerAvailable: No server is available matching preference: #<Mongo::ServerSelector::Primary:0x139580660 tag_sets=[] max_staleness=nil> using server_selection_timeout=60 and local_threshold=0.015
/usr/local/bundle/gems/mongo-2.6.2/lib/mongo/server_selector/selectable.rb:115:in `select_server'
/usr/local/bundle/gems/mongo-2.6.2/lib/mongo/cluster.rb:263:in `next_primary'
/usr/lib/ruby/2.3.0/forwardable.rb:202:in `next_primary'
/usr/local/bundle/gems/mongo-2.6.2/lib/mongo/index/view.rb:151:in `create_many'
/usr/local/bundle/gems/mongo-2.6.2/lib/mongo/index/view.rb:130:in `create_one'
/usr/local/bundle/gems/mongoid-5.4.0/lib/mongoid/indexable.rb:37:in `block in create_indexes'
/usr/local/bundle/gems/mongoid-5.4.0/lib/mongoid/indexable.rb:31:in `each'
/usr/local/bundle/gems/mongoid-5.4.0/lib/mongoid/indexable.rb:31:in `create_indexes'
/usr/local/bundle/gems/mongoid-5.4.0/lib/mongoid/tasks/database.rb:20:in `block in create_indexes'
/usr/local/bundle/gems/mongoid-5.4.0/lib/mongoid/tasks/database.rb:17:in `each'
/usr/local/bundle/gems/mongoid-5.4.0/lib/mongoid/tasks/database.rb:17:in `create_indexes'
/usr/local/bundle/gems/mongoid-5.4.0/lib/mongoid/tasks/database.rake:8:in `block (3 levels) in <top (required)>'
/usr/local/bundle/gems/rake-12.3.2/lib/rake/task.rb:273:in `block in execute'
/usr/local/bundle/gems/rake-12.3.2/lib/rake/task.rb:273:in `each'
/usr/local/bundle/gems/rake-12.3.2/lib/rake/task.rb:273:in `execute'
/usr/local/bundle/gems/airbrake-9.5.0/lib/airbrake/rake.rb:17:in `execute'
/usr/local/bundle/gems/rake-12.3.2/lib/rake/task.rb:214:in `block in invoke_with_call_chain'
/usr/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
/usr/local/bundle/gems/rake-12.3.2/lib/rake/task.rb:194:in `invoke_with_call_chain'
/usr/local/bundle/gems/rake-12.3.2/lib/rake/task.rb:183:in `invoke'
/usr/local/bundle/gems/rake-12.3.2/lib/rake/application.rb:160:in `invoke_task'
/usr/local/bundle/gems/rake-12.3.2/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/usr/local/bundle/gems/rake-12.3.2/lib/rake/application.rb:116:in `each'
/usr/local/bundle/gems/rake-12.3.2/lib/rake/application.rb:116:in `block in top_level'
/usr/local/bundle/gems/rake-12.3.2/lib/rake/application.rb:125:in `run_with_threads'
/usr/local/bundle/gems/rake-12.3.2/lib/rake/application.rb:110:in `top_level'
/usr/local/bundle/gems/rake-12.3.2/lib/rake/application.rb:83:in `block in run'
/usr/local/bundle/gems/rake-12.3.2/lib/rake/application.rb:186:in `standard_exception_handling'
/usr/local/bundle/gems/rake-12.3.2/lib/rake/application.rb:80:in `run'
/usr/local/bundle/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
/usr/local/bundle/bin/rake:23:in `load'
/usr/local/bundle/bin/rake:23:in `<main>'
Tasks: TOP => db:mongoid:create_indexes
Installed ruby gems:
mongo (2.6.2)
mongoid (5.4.0)
Am I missing some gem installation? Is it not yet supported thus can't migrate ATM?
Your application cannot connect to the database.
Am I missing some gem installation?
No, but you are using a rather old driver (although MongoDB, who maintains the MongoDB Ruby driver that you are using, does not support using it with DocumentDB regardless of version).
Is it not yet supported thus can't migrate ATM?
You haven't gotten to where the index creation was attempted.
The MongoDB driver for Ruby should work with Amazon DocumentDB. Have you checked the security group configuration and configured the certificate? DocumentDB is accessible only from the same VPC and has TLS enabled by default.
There are code samples on how to connect programmatically in the documentation.
I just installed carrierwave and have set my rails 4 app up to store images on Amazon s3 through fog. The app was working and deploying to Heroku with Carrierwave (but images were getting purged with dyno). After some initial issues I got it working on my localhost (as far as I could tell).
Now I am having trouble pushing the new version to Heroku. I have reset the DATABASE. Precompiled the assets and now trying to migrate the database. Below is the error I'm getting.
Running `rake db:migrate` attached to terminal... up, run.6517
rake aborted!
uninitialized constant Sprockets::Helpers
/app/app/uploaders/image_uploader.rb:12:in `<class:ImageUploader>'
/app/app/uploaders/image_uploader.rb:4:in `<top (required)>'
/app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/engine.rb:465:in `block (2 levels) in eager_load!'
/app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/engine.rb:464:in `each'
/app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/engine.rb:464:in `block in eager_load!'
/app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/engine.rb:462:in `each'
/app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/engine.rb:462:in `eager_load!'
/app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/engine.rb:347:in `eager_load!'
/app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application/finisher.rb:56:in `each'
/app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
/app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `instance_exec'
/app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `run'
/app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:55:in `block in run_initializers'
/app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:54:in `run_initializers'
/app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application.rb:215:in `initialize!'
/app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
/app/config/environment.rb:5:in `<top (required)>'
/app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application.rb:189:in `require_environment!'
/app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application.rb:249:in `block in run_tasks_blocks'
Tasks: TOP => db:migrate => environment
I have tried to include and not include Sprockets in the Uploader file and get the same error either way. I understand that Sprockets is no longer included in the master for Rails 4. I have now installed the sprockets-rails and sprockets-helper gems. I have also tried to require them at the top of the file (I don't understand this completely, but following this suggestion https://github.com/petebrowne/sprockets-helpers). Nothing has worked. Any suggestions about how I can go about resolving this. How do I initialize Sprockets::Helpers. Thanks.
I was making a pretty silly mistake. I had corrected files in my app and as committing the changes to the master, but I kept running the heroku run rake db:migrate command and getting the same error, so I didn't think I have resolved it yet. I had forgotten to push the new version to heroku! Hence the reason for still getting the same error.
Also, in case anyone else has a similar issue. Make sure you have fixed this:
https://github.com/carrierwaveuploader/carrierwave/issues/1020
I have recently migrated an existing rails 3.2.3 app to rails 4.0.0.rc2. I have made all the necessary changes and have been able to make it work fine on my local. But when I push this to heroku - "git push heroku master", it says failed to push some refs. The follwoing is the stack trace -
-----> Writing config/database.yml to read from DATABASE_URL
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
rake aborted!
could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 5432?
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/connection_adapters/postgresql_adapter.rb:825:in initialize'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/connection_adapters/postgresql_adapter.rb:825:innew'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/connection_adapters/postgresql_adapter.rb:825:in connect'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/connection_adapters/postgresql_adapter.rb:542:ininitialize'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/connection_adapters/postgresql_adapter.rb:41:in new'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/connection_adapters/postgresql_adapter.rb:41:inpostgresql_connection'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/connection_adapters/abstract/connection_pool.rb:440:in new_connection'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/connection_adapters/abstract/connection_pool.rb:450:incheckout_new_connection'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/connection_adapters/abstract/connection_pool.rb:421:in acquire_connection'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/connection_adapters/abstract/connection_pool.rb:356:inblock in checkout'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/connection_adapters/abstract/connection_pool.rb:355:in checkout'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/connection_adapters/abstract/connection_pool.rb:265:inblock in connection'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/connection_adapters/abstract/connection_pool.rb:264:in connection'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/connection_adapters/abstract/connection_pool.rb:546:inretrieve_connection'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/connection_handling.rb:79:in retrieve_connection'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/connection_handling.rb:53:inconnection'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/model_schema.rb:203:in table_exists?'
/tmp/build_uqaojzpp3n68/lib/custom_active_record/domain_constants_pool.rb:13:inevaluate_constants'
/tmp/build_uqaojzpp3n68/app/models/user_type.rb:4:in <class:UserType>'
/tmp/build_uqaojzpp3n68/app/models/user_type.rb:1:in'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:228:in require'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:228:inblock in require'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:213:in load_dependency'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:228:inrequire'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:329:in require_or_load'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:462:inload_missing_constant'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:183:in const_missing'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:494:inload_missing_constant'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:183:in const_missing'
/tmp/build_uqaojzpp3n68/app/models/user.rb:13:in'
/tmp/build_uqaojzpp3n68/app/models/user.rb:1:in <top (required)>'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:228:inrequire'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:228:in block in require'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:213:inload_dependency'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:228:in require'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:329:inrequire_or_load'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:462:in load_missing_constant'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:183:inconst_missing'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/inflector/methods.rb:226:in const_get'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/inflector/methods.rb:226:inblock in constantize'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/inflector/methods.rb:224:in each'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/inflector/methods.rb:224:ininject'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/inflector/methods.rb:224:in constantize'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:534:inget'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:565:in constantize'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/devise-3.0.0.rc/lib/devise.rb:274:inget'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/devise-3.0.0.rc/lib/devise/mapping.rb:77:in to'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/devise-3.0.0.rc/lib/devise/mapping.rb:72:inmodules'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/devise-3.0.0.rc/lib/devise/mapping.rb:89:in routes'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/devise-3.0.0.rc/lib/devise/mapping.rb:156:indefault_used_route'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/devise-3.0.0.rc/lib/devise/mapping.rb:66:in initialize'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/devise-3.0.0.rc/lib/devise.rb:308:innew'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/devise-3.0.0.rc/lib/devise.rb:308:in add_mapping'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/devise-3.0.0.rc/lib/devise/rails/routes.rb:208:inblock in devise_for'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/devise-3.0.0.rc/lib/devise/rails/routes.rb:207:in each'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/devise-3.0.0.rc/lib/devise/rails/routes.rb:207:indevise_for'
/tmp/build_uqaojzpp3n68/config/routes.rb:55:in block in <top (required)>'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0.rc2/lib/action_dispatch/routing/route_set.rb:316:ininstance_exec'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0.rc2/lib/action_dispatch/routing/route_set.rb:316:in eval_block'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0.rc2/lib/action_dispatch/routing/route_set.rb:294:indraw'
/tmp/build_uqaojzpp3n68/config/routes.rb:1:in <top (required)>'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:222:inload'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:222:in block in load'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:213:inload_dependency'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:222:in load'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc2/lib/rails/application/routes_reloader.rb:40:inblock in load_paths'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc2/lib/rails/application/routes_reloader.rb:40:in each'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc2/lib/rails/application/routes_reloader.rb:40:inload_paths'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc2/lib/rails/application/routes_reloader.rb:16:in reload!'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc2/lib/rails/application/routes_reloader.rb:26:inblock in updater'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/file_update_checker.rb:75:in call'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/file_update_checker.rb:75:inexecute'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc2/lib/rails/application/routes_reloader.rb:27:in updater'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc2/lib/rails/application/routes_reloader.rb:6:inexecute_if_updated'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc2/lib/rails/application/finisher.rb:69:in block in <module:Finisher>'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc2/lib/rails/initializable.rb:30:ininstance_exec'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc2/lib/rails/initializable.rb:30:in run'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc2/lib/rails/initializable.rb:55:inblock in run_initializers'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc2/lib/rails/initializable.rb:54:in run_initializers'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc2/lib/rails/application.rb:215:ininitialize!'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc2/lib/rails/railtie/configurable.rb:30:in method_missing'
/tmp/build_uqaojzpp3n68/config/environment.rb:5:in'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:228:in require'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:228:inblock in require'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:213:in load_dependency'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:228:inrequire'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc2/lib/rails/application.rb:189:in require_environment!'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc2/lib/rails/application.rb:249:inblock in run_tasks_blocks'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.0/lib/sprockets/rails/task.rb:54:in `block (2 levels) in define'
Tasks: TOP => environment
(See full trace by running task with --trace)
!
! Precompiling assets failed.
!
! Push rejected, failed to compile Ruby/Rails app
I use postgres on my local also, and its working fine. This app was previously deployed on heroku. I have added ruby 2.0.0 in Gemfile and the logs indicate that they are using ruby 2.0.0. I am not sure how to debug this. Is there any other change required to migrate existing app on heroku to 4.0.
Any help would be appreciated.
Thanks in advance.
Your problem is during slug compilation the environment variables are not available to your app. Try installing the user-env-compile labs feature.
I have been writing a Rails app and only now started bringing it under
test coverage. I have written a basic test and when I execute the
'rake' command at the command prompt, I get the following errors:
E:\testapp>rake
(in E:/testapp)
E:/Ruby192/bin/ruby.exe: unknown encoding name - \Ruby192\lib
(RuntimeError)
E:/Ruby192/bin/ruby.exe: unknown encoding name - \Ruby192\lib
(RuntimeError)
E:/Ruby192/bin/ruby.exe: unknown encoding name - \Ruby192\lib
(RuntimeError)
Errors running test:units, test:functionals, test:integration!
When I run rake test:units, I get
E:\testapp>rake test:units
(in E:/testapp)
E:/Ruby192/bin/ruby.exe: unknown encoding name - \Ruby192\lib
(RuntimeError)
rake aborted!
Command failed with status (1): [E:/Ruby192/bin/ruby.exe -I"lib;test"
"E:/R...]
E:/Ruby192/lib/ruby/1.9.1/rake.rb:993:in `block in sh'
E:/Ruby192/lib/ruby/1.9.1/rake.rb:1008:in `call'
E:/Ruby192/lib/ruby/1.9.1/rake.rb:1008:in `sh'
E:/Ruby192/lib/ruby/1.9.1/rake.rb:1092:in `sh'
E:/Ruby192/lib/ruby/1.9.1/rake.rb:1027:in `ruby'
E:/Ruby192/lib/ruby/1.9.1/rake.rb:1092:in `ruby'
E:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.5/lib/rails/test_unit/testing.rake:26:in `block (2 levels) in define'
E:/Ruby192/lib/ruby/1.9.1/rake.rb:1110:in `verbose'
E:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.5/lib/rails/test_unit/testing.rake:11:in `block in define'
E:/Ruby192/lib/ruby/1.9.1/rake.rb:634:in `call'
E:/Ruby192/lib/ruby/1.9.1/rake.rb:634:in `block in execute'
E:/Ruby192/lib/ruby/1.9.1/rake.rb:629:in `each'
E:/Ruby192/lib/ruby/1.9.1/rake.rb:629:in `execute'
E:/Ruby192/lib/ruby/1.9.1/rake.rb:595:in `block ininvoke_with_call_chain'
E:/Ruby192/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
E:/Ruby192/lib/ruby/1.9.1/rake.rb:588:in `invoke_with_call_chain'
E:/Ruby192/lib/ruby/1.9.1/rake.rb:581:in `invoke'
E:/Ruby192/lib/ruby/1.9.1/rake.rb:2041:in `invoke_task'
E:/Ruby192/lib/ruby/1.9.1/rake.rb:2019:in `block (2 levels) intop_level'
E:/Ruby192/lib/ruby/1.9.1/rake.rb:2019:in `each'
E:/Ruby192/lib/ruby/1.9.1/rake.rb:2019:in `block in top_level'
E:/Ruby192/lib/ruby/1.9.1/rake.rb:2058:in`standard_exception_handling'
E:/Ruby192/lib/ruby/1.9.1/rake.rb:2013:in `top_level'
E:/Ruby192/lib/ruby/1.9.1/rake.rb:1992:in `run'
E:/Ruby192/bin/rake:31:in `<main>'
I have tried searching on the Net to no success.. I initially assumed
something was wrong with my test code, but I get the same errors with
a new rails app!!
I am using Rails 3.0.5 on Ruby 1.9.2p180 on Windows Vista. On a friend's suggestion, I
installed RubyInstaller and used DevKit, but I still get the same
error.
Any inputs?
Looking at the path it seems you are pointing to ruby 1.9.1
E:/Ruby192/lib/ruby/1.9.1/rake.rb
I'm not familiar with Windows but something must still be pointing at the old Ruby version
I'm not particularly adept at describing the application deployment process. (I am more of a coder than a sysadmin). However, I really need to backup to my local machine my database from my Heroku deployment before pushing my new code out to Heroku and running a db migration. So, I'm trying to run heroku db:pull. When I do, I get the following Internal Server Error:
C:\Users\Morris\railsdev[[application]]>heroku db:pull
Loaded Taps v0.3.14
Auto-detected local database: sqlite://db/development.sqlite3
Warning: Data in the database 'sqlite://db/development.sqlite3' will be overwritten and will not be recoverable.
Are you sure you wish to continue? (y/n)? y
! Internal server error
So, I examined the log to get the backtrace. Here's what I get:
==> cron-4139529.log (crash)
/usr/ruby1.8.7/lib/ruby/1.8/rexml/parsers/baseparser.rb:330:in `pull'
/usr/ruby1.8.7/lib/ruby/1.8/rexml/parsers/treeparser.rb:22:in `parse'
/usr/ruby1.8.7/lib/ruby/1.8/rexml/document.rb:227:in `build'
/usr/ruby1.8.7/lib/ruby/1.8/rexml/document.rb:43:in `initialize'
/disk1/home/slugs/804b0fd8-de4e-44aa-9961-75f718fcf3d8/mnt/.bundle/gems/ruby/1.8
/gems/xml-simple-1.0.12/lib/xmlsimple.rb:959:in `new'
/disk1/home/slugs/804b0fd8-de4e-44aa-9961-75f718fcf3d8/mnt/.bundle/gems/ruby/1.8
/gems/xml-simple-1.0.12/lib/xmlsimple.rb:959:in `parse'
/disk1/home/slugs/804b0fd8-de4e-44aa-9961-75f718fcf3d8/mnt/.bundle/gems/ruby/1.8
/gems/xml-simple-1.0.12/lib/xmlsimple.rb:164:in `xml_in'
/disk1/home/slugs/804b0fd8-de4e-44aa-9961-75f718fcf3d8/mnt/.bundle/gems/ruby/1.8
/gems/xml-simple-1.0.12/lib/xmlsimple.rb:203:in `xml_in'
/disk1/home/slugs/804b0fd8-de4e-44aa-9961-75f718fcf3d8/mnt/.bundle/gems/ruby/1.8
/bundler/gems/tumblr-oauth-baa3f24a267c/lib/tumblr/request.rb:52:in `authenticat
e'
/disk1/home/slugs/804b0fd8-de4e-44aa-9961-75f718fcf3d8/mnt/.bundle/gems/ruby/1.8
/bundler/gems/tumblr-oauth-baa3f24a267c/lib/tumblr/user.rb:10:in `initialize'
/disk1/home/slugs/804b0fd8-de4e-44aa-9961-75f718fcf3d8/mnt/app/models/tumblog.rb
:181:in `new'
/disk1/home/slugs/804b0fd8-de4e-44aa-9961-75f718fcf3d8/mnt/app/models/tumblog.rb
:181:in `update_followers'
/disk1/home/slugs/804b0fd8-de4e-44aa-9961-75f718fcf3d8/mnt/app/models/tumblog.rb
:178:in `each'
/disk1/home/slugs/804b0fd8-de4e-44aa-9961-75f718fcf3d8/mnt/app/models/tumblog.rb
:178:in `update_followers'
/disk1/home/slugs/804b0fd8-de4e-44aa-9961-75f718fcf3d8/mnt/Rakefile:11
/home/slugs/804b0fd8-de4e-44aa-9961-75f718fcf3d8/mnt/.bundle/gems/ruby/1.8/gems/
rake-0.8.7/lib/rake.rb:636:in `call'
/home/slugs/804b0fd8-de4e-44aa-9961-75f718fcf3d8/mnt/.bundle/gems/ruby/1.8/gems/
rake-0.8.7/lib/rake.rb:636:in `execute'
/home/slugs/804b0fd8-de4e-44aa-9961-75f718fcf3d8/mnt/.bundle/gems/ruby/1.8/gems/
rake-0.8.7/lib/rake.rb:631:in `each'
/home/slugs/804b0fd8-de4e-44aa-9961-75f718fcf3d8/mnt/.bundle/gems/ruby/1.8/gems/
rake-0.8.7/lib/rake.rb:631:in `execute'
/home/slugs/804b0fd8-de4e-44aa-9961-75f718fcf3d8/mnt/.bundle/gems/ruby/1.8/gems/
rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/usr/ruby1.8.7/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/home/slugs/804b0fd8-de4e-44aa-9961-75f718fcf3d8/mnt/.bundle/gems/ruby/1.8/gems/
rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/home/slugs/804b0fd8-de4e-44aa-9961-75f718fcf3d8/mnt/.bundle/gems/ruby/1.8/gems/
rake-0.8.7/lib/rake.rb:583:in `invoke'
/home/slugs/804b0fd8-de4e-44aa-9961-75f718fcf3d8/mnt/.bundle/gems/ruby/1.8/gems/
rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/home/slugs/804b0fd8-de4e-44aa-9961-75f718fcf3d8/mnt/.bundle/gems/ruby/1.8/gems/
rake-0.8.7/lib/rake.rb:2029:in `top_level'
/home/slugs/804b0fd8-de4e-44aa-9961-75f718fcf3d8/mnt/.bundle/gems/ruby/1.8/gems/
rake-0.8.7/lib/rake.rb:2029:in `each'
/home/slugs/804b0fd8-de4e-44aa-9961-75f718fcf3d8/mnt/.bundle/gems/ruby/1.8/gems/
rake-0.8.7/lib/rake.rb:2029:in `top_level'
/home/slugs/804b0fd8-de4e-44aa-9961-75f718fcf3d8/mnt/.bundle/gems/ruby/1.8/gems/
rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/home/slugs/804b0fd8-de4e-44aa-9961-75f718fcf3d8/mnt/.bundle/gems/ruby/1.8/gems/
rake-0.8.7/lib/rake.rb:2023:in `top_level'
/home/slugs/804b0fd8-de4e-44aa-9961-75f718fcf3d8/mnt/.bundle/gems/ruby/1.8/gems/
rake-0.8.7/lib/rake.rb:2001:in `run'
/home/slugs/804b0fd8-de4e-44aa-9961-75f718fcf3d8/mnt/.bundle/gems/ruby/1.8/gems/
rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/home/slugs/804b0fd8-de4e-44aa-9961-75f718fcf3d8/mnt/.bundle/gems/ruby/1.8/gems/
rake-0.8.7/lib/rake.rb:1998:in `run'
/home/slugs/804b0fd8-de4e-44aa-9961-75f718fcf3d8/mnt/.bundle/gems/ruby/1.8/gems/
rake-0.8.7/bin/rake:31
/usr/ruby1.8.7/bin/rake:19:in `load'
/usr/ruby1.8.7/bin/rake:19
...
Missing end tag for 'link' (got "head")
Line:
Position:
Last 80 unconsumed characters:
Your application crashed.
Examine the backtrace above this message to debug.
I should note that the application runs fine on the server (and locally) as accessed through the web browser. Does anyone know why I am unable to pull my database?
db:pull is really slow with large datasets. Just for future reference, you might want to look at their pgbackups to capture a dump from the Postgres database rather than transferring record by record like db:pull:
$ heroku pgbackups:capture