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
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 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
I am trying to implement openid authentication using authlogic. I have installed the open_id_authentication in the process but when I entered
rake open_id_authentication:db:create --trace
I get the following error
(in /Users/felix/login)
rake aborted!
Don't know how to build task 'open_id_authentication:db:create'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:1728:in `[]'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2050:in `invoke_task'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in `block (2 levels) in top_level'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in `block in top_level'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2001:in `block in run'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.8.7/bin/rake:31:in `<top (required)>'
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19:in `<main>'
Can someone tell what am i doing incorrectly
Thanks
This plugin has been broken for some time. Some reports indicate it can be made to work by using older copies of an underlying plugin found on Github. I played around with it an never could find a combination of plugins/gems to make it work.
Duplicate Posting
I have a private Rails app that I'm trying to install locally. It's currently running in a hosting environment but I'd like to install it locally to begin making changes. I've already worked out that I can make deploy updates to the 'live' server but a recent misstep 'reinforced the need to make changes locally'.
After a fair amount of reading I determined that I needed to...
Grab the latest repository (It uses SVN)
Grab the database mysqldump -u root --databases my_db_development > my_db_development_0110.sql
Imported database locally (MAMP/Sequel Pro noticed there was no data in the database although there is data in the live server - is that strange?)
Validate database.yml (adapter: mysql, encoding: utf8, database: my_db_development, username: root, password: , host: localhost)
The next step I assumed was to get into my local directory and rake db:migrate --trace which returned the output below.
I'm a bit unsure how to go about understanding and identifying why I'm unable to move forward. Any ideas as to whether I've missed something or perhaps need to change something?
(in /Users/me/my_repo)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
rake aborted!
Multiple migrations have the version number 1
/Users/me/.gem/ruby/1.8/gems/activerecord-2.1.2/lib/active_record/migration.rb:472:in `migrations'
/Users/me/.gem/ruby/1.8/gems/activerecord-2.1.2/lib/active_record/connection_adapters/mysql_adapter.rb:15:in `inject'
/Users/me/.gem/ruby/1.8/gems/activerecord-2.1.2/lib/active_record/migration.rb:465:in `each'
/Users/me/.gem/ruby/1.8/gems/activerecord-2.1.2/lib/active_record/migration.rb:465:in `inject'
/Users/me/.gem/ruby/1.8/gems/activerecord-2.1.2/lib/active_record/migration.rb:465:in `migrations'
/Users/me/.gem/ruby/1.8/gems/activerecord-2.1.2/lib/active_record/migration.rb:431:in `migrate'
/Users/me/.gem/ruby/1.8/gems/activerecord-2.1.2/lib/active_record/migration.rb:373:in `up'
/Users/me/.gem/ruby/1.8/gems/activerecord-2.1.2/lib/active_record/migration.rb:356:in `migrate'
/Users/me/.gem/ruby/1.8/gems/rails-2.1.2/lib/tasks/databases.rake:99
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19
It seems you have duplicate migrations in your migrate directory. Check the prefixes of the migrations under database_migrations/migrate and make sure you haven't copied multiple versions or created migrations out of sync with the repository.
If you are importing the entire database from your production environment, then you won't need to run db:migrate - the database/schema should already be up to date. It sounds like you are missing data in your local database and something went wrong with the import.
I seem unable to install Gitorious. I am trying not to install Ruby Enterprise Edition, but apart from that I have been following the instructions for Ubunut (there were some errors but I have gotten around those). I have installed a number of missing packages and gems, but now I am stuck when I try to migrate the database. I get the following error:
rake aborted!
undefined method `[]' for nil:NilClass
Trace looks like this:
/var/www/gitorious/config/environments/production.rb:39:in `load_environment'
/var/www/gitorious/config/../vendor/rails/railties/lib/initializer.rb:386:in `load_environment'
/var/www/gitorious/vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
/var/www/gitorious/config/../vendor/rails/railties/lib/initializer.rb:379:in `load_environment'
/var/www/gitorious/config/../vendor/rails/railties/lib/initializer.rb:137:in `process'
/var/www/gitorious/config/../vendor/rails/railties/lib/initializer.rb:113:in `send'
/var/www/gitorious/config/../vendor/rails/railties/lib/initializer.rb:113:in `run'
/var/www/gitorious/config/environment.rb:13
/usr/lib/ruby/1.8/rubygems/custom_require.rb:32:in `gem_original_require'
/usr/lib/ruby/1.8/rubygems/custom_require.rb:32:in `require'
/var/www/gitorious/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
/var/www/gitorious/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
/var/www/gitorious/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
/var/www/gitorious/vendor/rails/railties/lib/tasks/misc.rake:4
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/var/lib/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/var/lib/gems/1.8/gems/rake-0.8.7/bin/rake:31
/var/lib/gems/1.8/bin/rake:19:in `load'
/var/lib/gems/1.8/bin/rake:19
My understanding is I this is claiming I'm missing some dependency, but I have checked that the dependencies in /var/www/gitorious/config/environment.rb have been installed.
I also put a print in custom_require.rb to print the path variable and the last print is "active_support/dependencies".
Does anyone have any idea what the problem is or how I could debug this further? Can I print the exact missing dependency somehow? Is it even possible to install gitorious without installing the entire Ruby Enterprise edition?
I asked about this from the Gitorious discussion group and the reason is the default gitorious.yml file only has settings for test environment. By copying those settings to the production environment, I got this problem fixed.