Created
September 12, 2012 22:43
-
-
Save imcsk8/3710530 to your computer and use it in GitHub Desktop.
rake db:migrate problem
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /var/lib/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb | |
| module ActiveRecord | |
| module ConnectionAdapters # :nodoc: | |
| module DatabaseStatements | |
| # Converts an arel AST to SQL | |
| def to_sql(arel, binds = []) | |
| if arel.respond_to?(:ast) | |
| visitor.accept(arel.ast) do <<<<<<---------- | |
| quote(*binds.shift.reverse) | |
| end | |
| else | |
| arel | |
| end | |
| end | |
| ------ | |
| rake --trace db:migrate | |
| ** Invoke db:migrate (first_time) | |
| ** Invoke environment (first_time) | |
| ** Execute environment | |
| ** Invoke db:load_config (first_time) | |
| ** Execute db:load_config | |
| ** Execute db:migrate | |
| rake aborted! | |
| undefined method `accept' for nil:NilClass | |
| /var/lib/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `to_sql' | |
| /var/lib/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:38:in `select_values' | |
| /var/lib/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/migration.rb:587:in `get_all_versions' | |
| /var/lib/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/migration.rb:745:in `migrated' | |
| /var/lib/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/migration.rb:668:in `current_version' | |
| /var/lib/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/migration.rb:685:in `block in migrate' | |
| /var/lib/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/migration.rb:685:in `each' | |
| /var/lib/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/migration.rb:685:in `detect' | |
| /var/lib/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/migration.rb:685:in `migrate' | |
| /var/lib/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/migration.rb:570:in `up' | |
| /var/lib/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/migration.rb:551:in `migrate' | |
| /var/lib/gems/1.9.1/gems/activerecord-3.2.8/lib/active_record/railties/databases.rake:153:in `block (2 levels) in <top (required)>' | |
| /var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call' | |
| /var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute' | |
| /var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each' | |
| /var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute' | |
| /var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain' | |
| /usr/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize' | |
| /var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain' | |
| /var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke' | |
| /var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task' | |
| /var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level' | |
| /var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each' | |
| /var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level' | |
| /var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling' | |
| /var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level' | |
| /var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run' | |
| /var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling' | |
| /var/lib/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run' | |
| /var/lib/gems/1.9.1/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>' | |
| /usr/local/bin/rake:19:in `load' | |
| /usr/local/bin/rake:19:in `<main>' | |
| Tasks: TOP => db:migrate | |
| ---- | |
| rake db:migrate | |
| rake aborted! | |
| undefined method `accept' for nil:NilClass | |
| Tasks: TOP => db:migrate | |
| (See full trace by running task with --trace) | |
| ------ | |
| Migration files: | |
| more db/migrate/20120912064250_create_clients.rb | |
| class CreateClients < ActiveRecord::Migration | |
| def change | |
| create_table :clients do |t| | |
| t.integer :id | |
| t.string :username | |
| t.string :password | |
| t.string :email | |
| t.string :name | |
| t.text :comments | |
| t.integer :credit | |
| t.iprange :ip | |
| t.timestamps | |
| end | |
| end | |
| end | |
| more db/migrate/20120912064440_create_resellers.rb | |
| class CreateResellers < ActiveRecord::Migration | |
| def change | |
| create_table :resellers do |t| | |
| t.integer :id | |
| t.string :username | |
| t.string :password | |
| t.string :email | |
| t.string :name | |
| t.text :comments | |
| t.integer :credit | |
| t.boolean :isadmin | |
| t.timestamps | |
| end | |
| end | |
| end | |
| ------- | |
| database.yml | |
| development: | |
| adapter: mysql2 | |
| database: database_dev | |
| encoding: utf8 | |
| pool: 5 | |
| username: user | |
| password: ------ | |
| timeout: 5000 | |
| host: localhost |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment