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 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 was following this How-To on Distributing Rails Applications
http://www.erikveen.dds.nl/distributingrubyapplications/rails.html
However, by the time I do:
$ ruby tar2rubyscript.rb desktopApp/
The output is:
tar2rubyscript.rb:623:in `replace': can't modify frozen String (RuntimeError)
from tar2rubyscript.rb:623:in `block in <main>'
from tar2rubyscript.rb:577:in `block in newlocation'
from tar2rubyscript.rb:505:in `block in newlocation'
from tar2rubyscript.rb:472:in `newlocation'
from tar2rubyscript.rb:505:in `newlocation'
from tar2rubyscript.rb:577:in `newlocation'
from tar2rubyscript.rb:621:in `<main>'
I'm trying to precompile my assets for production, but rails doesn't seem to be cooperating.
$ bundle exec rake assets:precompile
/home/drderp/.rvm/rubies/ruby-1.9.3-p194/bin/ruby /home/drderp/.rvm/gems/ruby-1.9.3-p194#global/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
rake aborted!
Unexpected token punc, expected punc (line: 213, col: 13, pos: 5986)
Error
at new JS_Parse_Error (<eval>:1720:22)
at js_error (<eval>:1728:15)
at croak (<eval>:2189:17)
at token_error (<eval>:2196:17)
at expect_token (<eval>:2209:17)
at Object.expect (<eval>:2212:40)
at Object.1 (<eval>:2763:38)
at prog1 (<eval>:2770:28)
at <eval>:2560:51
at maybe_unary (<eval>:2665:27)
(in /home/drderp/projects/p/app/assets/javascripts/application.js)
Tasks: TOP => assets:precompile:primary
(See full trace by running task with --trace)
rake aborted!
Command failed with status (1): [/home/drderp/.rvm/rubies/ruby-1.9.3-p194/b...]
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
This is the entire contents of application.js:
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
// Since javascript, no matter what order you load it in, executes in different order, it doesn't
// matter
//
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
// GO AFTER THE REQUIRES BELOW.
//
//= require jquery
Rails version 3.2.8, running on Ruby 1.9.3.
edit:
Here's bundle exec rake assets:precompile --trace, as requested:
$ bundle exec rake assets:precompile --trace
** Invoke assets:precompile (first_time)
** Execute assets:precompile
/home/drderp/.rvm/rubies/ruby-1.9.3-p194/bin/ruby /home/drderp/.rvm/gems/ruby-1.9.3-p194#global/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace
** Invoke assets:precompile:all (first_time)
** Execute assets:precompile:all
** Invoke assets:precompile:primary (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Invoke tmp:cache:clear (first_time)
** Execute tmp:cache:clear
** Execute assets:precompile:primary
rake aborted!
Unexpected token punc, expected punc (line: 213, col: 13, pos: 5986)
Error
at new JS_Parse_Error (<eval>:1720:22)
at js_error (<eval>:1728:15)
at croak (<eval>:2189:17)
at token_error (<eval>:2196:17)
at expect_token (<eval>:2209:17)
at Object.expect (<eval>:2212:40)
at Object.1 (<eval>:2763:38)
at prog1 (<eval>:2770:28)
at <eval>:2560:51
at maybe_unary (<eval>:2665:27)
(in /home/drderp/projects/p/app/assets/javascripts/application.js)
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/execjs-1.4.0/lib/execjs/ruby_racer_runtime.rb:34:in `rescue in block in eval'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/execjs-1.4.0/lib/execjs/ruby_racer_runtime.rb:28:in `block in eval'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/execjs-1.4.0/lib/execjs/ruby_racer_runtime.rb:80:in `block in lock'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/therubyracer-0.10.2/lib/v8/c/locker.rb:13:in `Locker'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/execjs-1.4.0/lib/execjs/ruby_racer_runtime.rb:78:in `lock'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/execjs-1.4.0/lib/execjs/ruby_racer_runtime.rb:27:in `eval'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/execjs-1.4.0/lib/execjs/ruby_racer_runtime.rb:19:in `exec'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/uglifier-1.3.0/lib/uglifier.rb:100:in `compile'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/sprockets/compressors.rb:74:in `compress'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/processing.rb:265:in `block in js_compressor='
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/processor.rb:29:in `call'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/processor.rb:29:in `evaluate'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/tilt-1.3.3/lib/tilt/template.rb:76:in `render'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/context.rb:177:in `block in evaluate'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/context.rb:174:in `each'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/context.rb:174:in `evaluate'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/bundled_asset.rb:26:in `initialize'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/base.rb:244:in `new'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/base.rb:244:in `build_asset'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/index.rb:89:in `block in build_asset'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/caching.rb:19:in `cache_asset'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/index.rb:88:in `build_asset'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/base.rb:163:in `find_asset'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/index.rb:56:in `find_asset'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/sprockets/static_compiler.rb:23:in `block in compile'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/base.rb:212:in `block in each_logical_path'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/base.rb:200:in `block (2 levels) in each_file'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/base.rb:190:in `each'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/base.rb:190:in `each_entry'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/base.rb:198:in `block in each_file'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/base.rb:197:in `each'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/base.rb:197:in `each_file'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/base.rb:210:in `each_logical_path'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/sprockets/static_compiler.rb:18:in `compile'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/sprockets/assets.rake:56:in `internal_precompile'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/sprockets/assets.rake:70:in `block (3 levels) in <top (required)>'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/home/drderp/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/sprockets/assets.rake:60:in `block (3 levels) in <top (required)>'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/home/drderp/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/bin/rake:19:in `load'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/bin/rake:19:in `<main>'
Tasks: TOP => assets:precompile:primary
rake aborted!
Command failed with status (1): [/home/drderp/.rvm/rubies/ruby-1.9.3-p194/b...]
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/file_utils.rb:53:in `block in create_shell_runner'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `call'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `sh'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:39:in `sh'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/file_utils.rb:80:in `ruby'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:39:in `ruby'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/sprockets/assets.rake:12:in `ruby_rake_task'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/sprockets/assets.rake:21:in `invoke_or_reboot_rake_task'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/sprockets/assets.rake:29:in `block (2 levels) in <top (required)>'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/home/drderp/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/bin/rake:19:in `load'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/bin/rake:19:in `<main>'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => assets:precompile
A more universal way to find the problem in js-assets:
Run rails console and:
JS_PATH = "app/assets/javascripts/**/*.js";
Dir[JS_PATH].each do |file_name|
puts "\n#{file_name}"
puts Uglifier.compile(File.read(file_name))
end
I had this same problem. Open your Javascript console in the browser and see where there is an error. I suspect (because it was the solution to my problem), that one of your JS files has an error and it is most likely whatever JS you wrote that used a ">" symbol.
Good luck error hunting.
In my case, I was using es6 syntax ()=>{...} in js file.
Replacing it with function(){...} fixed the problem.
This was horrible; no javascript error on my local computer means that there's an issue with asset compilation.
Here's how I solved it.
As suggested in the comments for a similar question ExecJS::ProgramError: Unexpected token punc «(», expected punc «:» when running rake assets:precompile on production , I removed uglifier (in production.rb, comment out the compressor line) and compression altogether. (I had tried with other compressors; yui did not give much information. closure seemed to give me a hint but didn't help much)
I then compressed the assets locally, then I pushed to production.
(To compress locally, use RAILS_ENV=production rake assets:precompile )
I ran on the server and this is when the javascript errors surfaced. It was basically erroneous merging of files (mainly due to something commented out).
I got rid of those lines and pushed back to production. Everything succeeded.
I brought back uglifier, deleted the precompiled assets under public/assets/ and pushed back to production.
I hope this helps someone!
Just a heads up on this, I had same issue and what was happening, when precompiling assets in production environment (and pushing to Heroku) several of my JS files were being inserted with foreign characters, along the lines of...
<<<<<<<<HEAD
===========
>>>>>>(random alphanumeric key)
I just ran a global search in my site directory for "<<" and quickly found the affected files & deleted these terms - everything worked fine.
Necessary details:
For us, it was a weird little thing which leads us to actual underlying error, hence solution.
We had uglifier gem v 4.1.x and latest at the time of writing is 4.2.x we updated the uglifier version, just in case.
And what happened was that this new version actually started spitting out actual file locations where the error of compilation was happening. And when we know where the error is coming from, we fix it.
Additional details:
The actual issue was that we had some js.erb files and these files were running some rails code to populate some env data, something like:
const config = {
abc: <%= Figaro.env.abc %>,
xyz: <%= Figaro.env.xyz %>
}
And the error we were getting was: Uglifier::Error: Unexpected token: punc (,).
So it was obvious for some reason Figaro was not giving us our desired values. We went on to fix that and checked our assumption by hardcoding random values, which compiled the JS successfully.
Putting it here so it may help someone.
PS: Top answer is great, but for some reason, it gave us some random jsx related errors to us instead of giving us an actual error.
For some reason, on Heroku and also when I ran the above-mentioned code to "uglify" the javascript in the rails console, it would not report the line number of the error!.
It is just a ruby wrapper for UglifyJS, which you can use online here https://skalman.github.io/UglifyJS-online/.
So I just copied and pasted the offending js file in here, and it reported the line number. Very easy.
Verify the new JS files that you added in your application include plugins and other added by Bower or something like it.
Try add one by one to find what file have problem. In my case was in anchor-scroll.js. When I changed to use anchor-scroll.min rake runs ok.
Change this:
//= require anchor-scroll/scroll
For:
//= require anchor-scroll/scroll.min
My problem was with two success calls.
First was mqtt onSuccess:
onSuccess() {
console.log("mqtt connected")
};
that I solved with:
onSuccess: function() {
console.log("mqtt connected")
};
and the second was Ajax success. Linter will show you
Error: Expected method shorthand
but everything will work properly.
"/home/drderp/.rvm/rubies/ruby-1.9.3-p194/bin/ruby /home/drderp/.rvm/gems/ruby-1.9.3-p194#global/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets"
There's a space between the bolded portion (between ruby, the backslash, and home).
I don't know if this was a typo, but it could be your problem because Rails doesn't like spaces in directory names. Rename that folder, and try running your code again.
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