This question already has answers here:
Mysql2 Error MySQL server has gone away
(4 answers)
Closed 8 years ago.
I have updated an app from rails 3.2 to rails 4.0.2 and I seem to be getting random mysql errors when I run rspec. This was NOT happening before the rails 4 upgrade.
Environment details:
Mac OSX
ruby 2.0
Rails 4.0.2
mysql2 gem
The error:
ActiveRecord::StatementInvalid:
Mysql2::Error: MySQL server has gone away: SELECT
UPDATE: Having a similar issue on heroku while running a rake task as well
Stack trace:
Mysql2::Error: Lost connection to MySQL server during query: SELECT ....
(0.1ms) ROLLBACK
Mysql2::Error: MySQL server has gone away: ROLLBACK
rake aborted!
Mysql2::Error: Lost connection to MySQL server during query: SELECT ...
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:287:in `query'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:287:in `block in execute'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract_adapter.rb:435:in `block in log'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract_adapter.rb:430:in `log'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:287:in `execute'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/mysql2_adapter.rb:222:in `execute'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/mysql2_adapter.rb:226:in `exec_query'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/mysql2_adapter.rb:235:in `select'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:24:in `select_all'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/query_cache.rb:63:in `select_all'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/querying.rb:36:in `find_by_sql'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/relation.rb:585:in `exec_queries'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/relation.rb:471:in `load'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/relation.rb:220:in `to_a'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/relation.rb:598:in `exec_queries'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/association_relation.rb:15:in `exec_queries'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/relation.rb:471:in `load'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/relation.rb:220:in `to_a'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/relation/finder_methods.rb:325:in `find_first'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/relation/finder_methods.rb:90:in `first'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-deprecated_finders-1.0.3/lib/active_record/deprecated_finders/relation.rb:129:in `first'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/associations/singular_association.rb:42:in `find_target'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/associations/association.rb:147:in `load_target'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/associations/association.rb:54:in `reload'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/associations/singular_association.rb:9:in `reader'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/associations/builder/association.rb:70:in `assessment'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/associations/builder/belongs_to.rb:28:in `belongs_to_counter_cache_after_create_for_assessment'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/callbacks.rb:375:in `_run__4224105350082465631__create__callbacks'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/callbacks.rb:80:in `run_callbacks'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/callbacks.rb:306:in `create_record'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/timestamp.rb:57:in `create_record'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/persistence.rb:477:in `create_or_update'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/callbacks.rb:302:in `block in create_or_update'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/callbacks.rb:403:in `_run__4224105350082465631__save__callbacks'
/app/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/callbacks.rb:80:in `run_callbacks'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/callbacks.rb:302:in `create_or_update'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/persistence.rb:128:in `save!'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/validations.rb:57:in `save!'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/attribute_methods/dirty.rb:41:in `save!'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/transactions.rb:275:in `block in save!'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/transactions.rb:326:in `block in with_transaction_returning_status'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:200:in `transaction'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/transactions.rb:209:in `transaction'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/transactions.rb:323:in `with_transaction_returning_status'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/transactions.rb:275:in `save!'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/associations/has_many_through_association.rb:94:in `save_through_record'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/associations/has_many_through_association.rb:65:in `insert_record'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/associations/collection_association.rb:523:in `block (2 levels) in concat_records'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/associations/collection_association.rb:367:in `add_to_target'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/associations/collection_association.rb:522:in `block in concat_records'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/associations/collection_association.rb:520:in `each'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/associations/collection_association.rb:520:in `concat_records'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/associations/has_many_through_association.rb:43:in `concat_records'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/associations/collection_association.rb:137:in `block in concat'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/associations/collection_association.rb:152:in `block in transaction'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:202:in `block in transaction'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:210:in `within_new_transaction'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:202:in `transaction'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/transactions.rb:209:in `transaction'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/associations/collection_association.rb:151:in `transaction'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/associations/collection_association.rb:137:in `concat'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/associations/has_many_through_association.rb:37:in `concat'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/associations/collection_proxy.rb:943:in `<<'
/app/lib/tasks/scrape_workbook.rake:143:in `block (3 levels) in <top (required)>'
/app/vendor/bundle/ruby/2.0.0/gems/nokogiri-1.6.1/lib/nokogiri/xml/node_set.rb:237:in `block in each'
/app/vendor/bundle/ruby/2.0.0/gems/nokogiri-1.6.1/lib/nokogiri/xml/node_set.rb:236:in `upto'
/app/vendor/bundle/ruby/2.0.0/gems/nokogiri-1.6.1/lib/nokogiri/xml/node_set.rb:236:in `each'
/app/lib/tasks/scrape_workbook.rake:29:in `block (2 levels) in <top (required)>'
/app/vendor/bundle/ruby/2.0.0/gems/aws-sdk-1.32.0/lib/aws/core/collection.rb:48:in `each'
/app/vendor/bundle/ruby/2.0.0/gems/aws-sdk-1.32.0/lib/aws/core/collection.rb:48:in `block in each'
/app/vendor/bundle/ruby/2.0.0/gems/aws-sdk-1.32.0/lib/aws/core/collection/with_limit_and_next_token.rb:61:in `_each_batch'
/app/vendor/bundle/ruby/2.0.0/gems/aws-sdk-1.32.0/lib/aws/core/collection.rb:80:in `each_batch'
/app/vendor/bundle/ruby/2.0.0/gems/aws-sdk-1.32.0/lib/aws/core/collection.rb:47:in `each'
/app/vendor/bundle/ruby/2.0.0/gems/aws-sdk-1.32.0/lib/aws/s3/object_collection.rb:282:in `each'
/app/lib/tasks/scrape_workbook.rake:12:in `block in <top (required)>'
Try this.
do "bundle install --without production"
See if this helps.
Related
Whenever I run bin/rails db:migrate locally I run into the following error:
bin/rails db:migrate
== 20200108204517 AddFirstAndLastNameToUsers: migrating =======================
-- add_column(:users, :first_name, :string, {:limit=>255, :null=>false})
rails aborted!
StandardError: An error has occurred, all later migrations canceled:
Mysql2::Error: Table 'monaco_development.users' doesn't exist
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/mysql2-0.5.3/lib/mysql2/client.rb:131:in `_query'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/mysql2-0.5.3/lib/mysql2/client.rb:131:in `block in query'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/mysql2-0.5.3/lib/mysql2/client.rb:130:in `handle_interrupt'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/mysql2-0.5.3/lib/mysql2/client.rb:130:in `query'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activerecord-6.0.1/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:202:in `block (2 levels) in execute'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activesupport-6.0.1/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activesupport-6.0.1/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activesupport-6.0.1/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activerecord-6.0.1/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:201:in `block in execute'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activerecord-6.0.1/lib/active_record/connection_adapters/abstract_adapter.rb:718:in `block (2 levels) in log'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activerecord-6.0.1/lib/active_record/connection_adapters/abstract_adapter.rb:717:in `block in log'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activesupport-6.0.1/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activerecord-6.0.1/lib/active_record/connection_adapters/abstract_adapter.rb:708:in `log'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activerecord-6.0.1/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:200:in `execute'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activerecord-6.0.1/lib/active_record/connection_adapters/mysql/database_statements.rb:41:in `execute'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activerecord-6.0.1/lib/active_record/connection_adapters/abstract/schema_statements.rb:591:in `add_column'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activerecord-6.0.1/lib/active_record/migration.rb:890:in `block in method_missing'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activerecord-6.0.1/lib/active_record/migration.rb:858:in `block in say_with_time'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activerecord-6.0.1/lib/active_record/migration.rb:858:in `say_with_time'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activerecord-6.0.1/lib/active_record/migration.rb:879:in `method_missing'
/Users/robskrob/code/projects/kingandpartners/monaco/db/migrate/20200108204517_add_first_and_last_name_to_users.rb:3:in `change'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activerecord-6.0.1/lib/active_record/migration.rb:828:in `exec_migration'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activerecord-6.0.1/lib/active_record/migration.rb:812:in `block (2 levels) in migrate'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activerecord-6.0.1/lib/active_record/migration.rb:811:in `block in migrate'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activerecord-6.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:473:in `with_connection'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activerecord-6.0.1/lib/active_record/migration.rb:810:in `migrate'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activerecord-6.0.1/lib/active_record/migration.rb:1001:in `migrate'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activerecord-6.0.1/lib/active_record/migration.rb:1311:in `block in execute_migration_in_transaction'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activerecord-6.0.1/lib/active_record/migration.rb:1364:in `ddl_transaction'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activerecord-6.0.1/lib/active_record/migration.rb:1310:in `execute_migration_in_transaction'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activerecord-6.0.1/lib/active_record/migration.rb:1282:in `block in migrate_without_lock'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activerecord-6.0.1/lib/active_record/migration.rb:1281:in `each'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activerecord-6.0.1/lib/active_record/migration.rb:1281:in `migrate_without_lock'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activerecord-6.0.1/lib/active_record/migration.rb:1229:in `block in migrate'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activerecord-6.0.1/lib/active_record/migration.rb:1382:in `with_advisory_lock'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activerecord-6.0.1/lib/active_record/migration.rb:1229:in `migrate'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activerecord-6.0.1/lib/active_record/migration.rb:1061:in `up'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activerecord-6.0.1/lib/active_record/migration.rb:1036:in `migrate'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activerecord-6.0.1/lib/active_record/tasks/database_tasks.rb:238:in `migrate'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activerecord-6.0.1/lib/active_record/railties/databases.rake:85:in `block (3 levels) in <main>'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activerecord-6.0.1/lib/active_record/railties/databases.rake:83:in `each'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activerecord-6.0.1/lib/active_record/railties/databases.rake:83:in `block (2 levels) in <main>'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/railties-6.0.1/lib/rails/commands/rake/rake_command.rb:23:in `block in perform'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/railties-6.0.1/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/railties-6.0.1/lib/rails/command.rb:48:in `invoke'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/railties-6.0.1/lib/rails/commands.rb:18:in `<main>'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activesupport-6.0.1/lib/active_support/dependencies.rb:325:in `block in require'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activesupport-6.0.1/lib/active_support/dependencies.rb:291:in `load_dependency'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/activesupport-6.0.1/lib/active_support/dependencies.rb:325:in `require'
/Users/robskrob/code/projects/kingandpartners/monaco/bin/rails:9:in `<top (required)>'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/spring-2.1.0/lib/spring/client/rails.rb:28:in `load'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/spring-2.1.0/lib/spring/client/rails.rb:28:in `call'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/spring-2.1.0/lib/spring/client/command.rb:7:in `call'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/spring-2.1.0/lib/spring/client.rb:30:in `run'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/spring-2.1.0/bin/spring:49:in `<top (required)>'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/spring-2.1.0/lib/spring/binstub.rb:11:in `load'
/Users/robskrob/.rvm/gems/ruby-2.6.0/gems/spring-2.1.0/lib/spring/binstub.rb:11:in `<top (required)>'
/Users/robskrob/code/projects/kingandpartners/monaco/bin/spring:15:in `<top (required)>'
bin/rails:3:in `load'
bin/rails:3:in `<main>'
This migration which creates the users table 20200103171631_devise_create_users.rb comes before the one that is currently failing 20200108204517_add_first_and_last_name_to_users.rb. So of course the error makes sense -- the migrate to create the users table did not run first. However, my question is, why is 0200108204517_add_first_and_last_name_to_users.rb running before the migration which creates the users 20200103171631_devise_create_users.rb ? I do believe the date on the file here 20200103171631_devise_create_users.rb has an earlier date and should be running before 0200108204517_add_first_and_last_name_to_users.rb.
my rails app is using:
gem 'rails', '~> 6.0.1'
gem 'mysql2', '>= 0.4.4'
gem 'devise', '~> 4.7.1'
Did you check my_database.schema_migrations table? You may find that Rails has already marked this migration as executed.
See https://edgeguides.rubyonrails.org/active_record_migrations.html#old-migrations
The users table may not exist because it's possible it was deleted manually.
Is there development happening for Rails 6 in Neo4j.rb? In a new rails 6(rc1) project, if I create a couple scaffolds then run 'rake neo4j:migrate:all' I get an error that when I follow it quickly rabbitholes much deeper into the internals of ActiveModel than I can parse:
NoMethodError: undefined method `force_change' for #<ActiveModel::NullMutationTracker:0x00007fa1aadd8788>
/Users/metkat/.rvm/gems/ruby-2.6.0/gems/activemodel-6.0.0.rc1/lib/active_model/dirty.rb:268:in `attribute_will_change!'
/Users/metkat/.rvm/gems/ruby-2.6.0/gems/activemodel-6.0.0.rc1/lib/active_model/attribute_methods.rb:383:in `migration_id_will_change!'
/Users/metkat/.rvm/gems/ruby-2.6.0/gems/neo4j-9.2.4/lib/neo4j/shared/property.rb:213:in `block in attribute!'
/Users/metkat/.rvm/gems/ruby-2.6.0/gems/neo4j-9.2.4/lib/neo4j/shared/property.rb:51:in `block in send_props'
/Users/metkat/.rvm/gems/ruby-2.6.0/gems/neo4j-9.2.4/lib/neo4j/shared/property.rb:51:in `each'
/Users/metkat/.rvm/gems/ruby-2.6.0/gems/neo4j-9.2.4/lib/neo4j/shared/property.rb:51:in `send_props'
/Users/metkat/.rvm/gems/ruby-2.6.0/gems/neo4j-9.2.4/lib/neo4j/shared/property.rb:32:in `initialize'
/Users/metkat/.rvm/gems/ruby-2.6.0/gems/neo4j-9.2.4/lib/neo4j/active_node/property.rb:7:in `initialize'
/Users/metkat/.rvm/gems/ruby-2.6.0/gems/neo4j-9.2.4/lib/neo4j/shared/callbacks.rb:19:in `block in initialize'
/Users/metkat/.rvm/gems/ruby-2.6.0/gems/activesupport-6.0.0.rc1/lib/active_support/callbacks.rb:101:in `run_callbacks'
/Users/metkat/.rvm/gems/ruby-2.6.0/gems/neo4j-9.2.4/lib/neo4j/shared/callbacks.rb:19:in `initialize'
/Users/metkat/.rvm/gems/ruby-2.6.0/gems/neo4j-9.2.4/lib/neo4j/active_node.rb:53:in `initialize'
/Users/metkat/.rvm/gems/ruby-2.6.0/gems/neo4j-9.2.4/lib/neo4j/active_node/persistence.rb:116:in `new'
/Users/metkat/.rvm/gems/ruby-2.6.0/gems/neo4j-9.2.4/lib/neo4j/active_node/persistence.rb:116:in `create!'
/Users/metkat/.rvm/gems/ruby-2.6.0/gems/neo4j-9.2.4/lib/neo4j/migrations/base.rb:31:in `migrate_up'
/Users/metkat/.rvm/gems/ruby-2.6.0/gems/neo4j-9.2.4/lib/neo4j/migrations/base.rb:16:in `block in migrate'
/Users/metkat/.rvm/rubies/ruby-2.6.0/lib/ruby/2.6.0/benchmark.rb:308:in `realtime'
/Users/metkat/.rvm/gems/ruby-2.6.0/gems/neo4j-9.2.4/lib/neo4j/migrations/base.rb:15:in `migrate'
/Users/metkat/.rvm/gems/ruby-2.6.0/gems/neo4j-9.2.4/lib/neo4j/migrations/runner.rb:127:in `block in migrate'
/Users/metkat/.rvm/gems/ruby-2.6.0/gems/neo4j-9.2.4/lib/neo4j/migrations/runner.rb:133:in `migration_message'
/Users/metkat/.rvm/gems/ruby-2.6.0/gems/neo4j-9.2.4/lib/neo4j/migrations/runner.rb:125:in `migrate'
/Users/metkat/.rvm/gems/ruby-2.6.0/gems/neo4j-9.2.4/lib/neo4j/migrations/runner.rb:26:in `block in all'
/Users/metkat/.rvm/gems/ruby-2.6.0/gems/neo4j-9.2.4/lib/neo4j/migrations/runner.rb:24:in `each'
/Users/metkat/.rvm/gems/ruby-2.6.0/gems/neo4j-9.2.4/lib/neo4j/migrations/runner.rb:24:in `all'
/Users/metkat/.rvm/gems/ruby-2.6.0/gems/neo4j-9.2.4/lib/neo4j/tasks/migration.rake:116:in `block (3 levels) in <main>'
/Users/metkat/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273:in `block in execute'
/Users/metkat/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273:in `each'
/Users/metkat/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273:in `execute'
/Users/metkat/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:214:in `block in invoke_with_call_chain'
/Users/metkat/.rvm/rubies/ruby-2.6.0/lib/ruby/2.6.0/monitor.rb:230:in `mon_synchronize'
/Users/metkat/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:194:in `invoke_with_call_chain'
/Users/metkat/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:183:in `invoke'
/Users/metkat/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:160:in `invoke_task'
/Users/metkat/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/Users/metkat/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:116:in `each'
/Users/metkat/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:116:in `block in top_level'
/Users/metkat/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:125:in `run_with_threads'
/Users/metkat/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:110:in `top_level'
/Users/metkat/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:83:in `block in run'
/Users/metkat/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:186:in `standard_exception_handling'
/Users/metkat/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:80:in `run'
/Users/metkat/.rvm/rubies/ruby-2.6.0/lib/ruby/gems/2.6.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
/Users/metkat/.rvm/gems/ruby-2.6.0/bin/rake:23:in `load'
/Users/metkat/.rvm/gems/ruby-2.6.0/bin/rake:23:in `<main>'
/Users/metkat/.rvm/gems/ruby-2.6.0/bin/ruby_executable_hooks:24:in `eval'
/Users/metkat/.rvm/gems/ruby-2.6.0/bin/ruby_executable_hooks:24:in `<main>'
Tasks: TOP => neo4j:migrate:all
It is fixed with this pull request. With neo4jrb version 9.6.0 and onwards.
It looks like it's related to this PR which landed in RC1, I'm running into the same issue. I pinged that thread to see if it was intentional. In the meantime, try rolling back to the last beta or monkey patching ActiveModel::NullMutationTracker (which is what I did and confirmed it fixed the issue) by adding the following methods back into it:
def forget_change(attr_name)
end
def original_value(attr_name)
end
def force_change(attr_name)
end
HI this is the terminal output when I run jekyll build
Configuration file: /Users/makingthings/Dropbox/Sites/jekyll-uh/_config.yml
/usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- jekyll-responsive_image (LoadError)
from /usr/local/Cellar/ruby/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/lib/jekyll/plugin_manager.rb:29:in `block in require_gems'
from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/lib/jekyll/plugin_manager.rb:26:in `each'
from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/lib/jekyll/plugin_manager.rb:26:in `require_gems'
from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/lib/jekyll/plugin_manager.rb:19:in `conscientious_require'
from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/lib/jekyll/site.rb:79:in `setup'
from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/lib/jekyll/site.rb:41:in `initialize'
from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/lib/jekyll/commands/build.rb:29:in `new'
from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/lib/jekyll/commands/build.rb:29:in `process'
from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
from /usr/local/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `call'
from /usr/local/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `block in execute'
from /usr/local/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `each'
from /usr/local/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `execute'
from /usr/local/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/program.rb:42:in `go'
from /usr/local/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary.rb:19:in `program'
from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/bin/jekyll:20:in `<top (required)>'
from /usr/local/bin/jekyll:23:in `load'
from /usr/local/bin/jekyll:23:in `<main>'
Possibly conflicting ruby environments?
Not so familiar with ruby but I got this working with config like this:
gems: [jekyll/responsive_image]
This is the oddest error I've ever seen.
I'm trying to deploy rails with a app server and a remote db server.
I can run rails dbconsole and login to the the database just fine from the app server.
I can also run rake db:drop && rake db:create just fine as well but when I run rake db:migrate all hell breaks lose with errors I've never seen before dealing with migrating a db. I bet it's a simple fix that i'm not seeing but please have a look and tell me what I can to fix this. Thank you all who try!
I can run db:migrate on my local machine and it works just fine but when I deploy I get:
rake aborted!
ArgumentError: comparison of Fixnum with String failed
ArgumentError: comparison of Fixnum with String failed
ArgumentError: comparison of String with 0 failed
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
So then I run it with trace and it still doesn't give me any want to fix it
** 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!
ArgumentError: comparison of Fixnum with String failed
/home/apps/.rbenv/versions/2.1.0/lib/ruby/2.1.0/logger.rb:366:in `<'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/2.1.0/logger.rb:366:in `add'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/2.1.0/logger.rb:452:in `error'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract_adapter.rb:428:in `rescue in log'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract_adapter.rb:425:in `log'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:286:in `execute'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/mysql2_adapter.rb:220:in `execute'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:300:in `execute_and_free'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:414:in `tables'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:421:in `table_exists?'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/schema_migration.rb:17:in `create_table'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:878:in `initialize'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:764:in `new'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:764:in `up'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:742:in `migrate'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/railties/databases.rake:42:in `block (2 levels) in <top (required)>'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/task.rb:240:in `call'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/task.rb:240:in `block in execute'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/task.rb:235:in `each'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/task.rb:235:in `execute'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/task.rb:165:in `invoke'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/application.rb:150:in `invoke_task'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/application.rb:106:in `each'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/application.rb:106:in `block in top_level'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/application.rb:115:in `run_with_threads'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/application.rb:100:in `top_level'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/application.rb:78:in `block in run'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/application.rb:176:in `standard_exception_handling'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/application.rb:75:in `run'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/bin/rake:33:in `<top (required)>'
/home/apps/.rbenv/versions/2.1.0/bin/rake:23:in `load'
/home/apps/.rbenv/versions/2.1.0/bin/rake:23:in `<main>'
ArgumentError: comparison of Fixnum with String failed
/home/apps/.rbenv/versions/2.1.0/lib/ruby/2.1.0/logger.rb:366:in `<'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/2.1.0/logger.rb:366:in `add'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/2.1.0/logger.rb:452:in `error'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.0.0/lib/active_support/log_subscriber.rb:85:in `rescue in finish'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.0.0/lib/active_support/log_subscriber.rb:83:in `finish'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.0.0/lib/active_support/notifications/fanout.rb:96:in `finish'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.0.0/lib/active_support/notifications/fanout.rb:40:in `block in finish'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.0.0/lib/active_support/notifications/fanout.rb:40:in `each'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.0.0/lib/active_support/notifications/fanout.rb:40:in `finish'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.0.0/lib/active_support/notifications/instrumenter.rb:36:in `finish'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.0.0/lib/active_support/notifications/instrumenter.rb:25:in `instrument'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract_adapter.rb:420:in `log'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:286:in `execute'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/mysql2_adapter.rb:220:in `execute'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:300:in `execute_and_free'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:414:in `tables'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:421:in `table_exists?'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/schema_migration.rb:17:in `create_table'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:878:in `initialize'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:764:in `new'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:764:in `up'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:742:in `migrate'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/railties/databases.rake:42:in `block (2 levels) in <top (required)>'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/task.rb:240:in `call'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/task.rb:240:in `block in execute'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/task.rb:235:in `each'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/task.rb:235:in `execute'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/task.rb:165:in `invoke'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/application.rb:150:in `invoke_task'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/application.rb:106:in `each'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/application.rb:106:in `block in top_level'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/application.rb:115:in `run_with_threads'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/application.rb:100:in `top_level'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/application.rb:78:in `block in run'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/application.rb:176:in `standard_exception_handling'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/application.rb:75:in `run'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/bin/rake:33:in `<top (required)>'
/home/apps/.rbenv/versions/2.1.0/bin/rake:23:in `load'
/home/apps/.rbenv/versions/2.1.0/bin/rake:23:in `<main>'
ArgumentError: comparison of String with 0 failed
/home/apps/.rbenv/versions/2.1.0/lib/ruby/2.1.0/logger.rb:273:in `<='
/home/apps/.rbenv/versions/2.1.0/lib/ruby/2.1.0/logger.rb:273:in `debug?'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/log_subscriber.rb:37:in `sql'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.0.0/lib/active_support/subscriber.rb:68:in `finish'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.0.0/lib/active_support/log_subscriber.rb:83:in `finish'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.0.0/lib/active_support/notifications/fanout.rb:96:in `finish'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.0.0/lib/active_support/notifications/fanout.rb:40:in `block in finish'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.0.0/lib/active_support/notifications/fanout.rb:40:in `each'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.0.0/lib/active_support/notifications/fanout.rb:40:in `finish'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.0.0/lib/active_support/notifications/instrumenter.rb:36:in `finish'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activesupport-4.0.0/lib/active_support/notifications/instrumenter.rb:25:in `instrument'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract_adapter.rb:420:in `log'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:286:in `execute'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/mysql2_adapter.rb:220:in `execute'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:300:in `execute_and_free'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:414:in `tables'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:421:in `table_exists?'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/schema_migration.rb:17:in `create_table'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:878:in `initialize'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:764:in `new'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:764:in `up'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/migration.rb:742:in `migrate'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/activerecord-4.0.0/lib/active_record/railties/databases.rake:42:in `block (2 levels) in <top (required)>'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/task.rb:240:in `call'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/task.rb:240:in `block in execute'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/task.rb:235:in `each'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/task.rb:235:in `execute'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/task.rb:165:in `invoke'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/application.rb:150:in `invoke_task'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/application.rb:106:in `each'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/application.rb:106:in `block in top_level'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/application.rb:115:in `run_with_threads'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/application.rb:100:in `top_level'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/application.rb:78:in `block in run'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/application.rb:176:in `standard_exception_handling'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/lib/rake/application.rb:75:in `run'
/home/apps/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.2.2/bin/rake:33:in `<top (required)>'
/home/apps/.rbenv/versions/2.1.0/bin/rake:23:in `load'
/home/apps/.rbenv/versions/2.1.0/bin/rake:23:in `<main>'
Tasks: TOP => db:migrate
Face Palm.
I had this in my environment file and it was causing the issue:
config.logger = Logger.new(STDOUT)
config.logger.level = 'DEBUG'
Changed config.logger.level = 'DEBUG' to config.log_level = 'DEBUG'
All is well now.
I created a new Rails application using the command from the Ubuntu terminal:
rails new testing -d mysql
I then added the root password in the database.yml file
when I run the command rails server to run the application on the server the following occurs:
=> Booting WEBrick
=> Rails 3.2.13 application starting in`enter code here` development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/home/russian/.rvm/gems/ruby-1.9.3-p392/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `connect': Unknown database 'testing_development' (Mysql2::Error)
from /home/russian/.rvm/gems/ruby-1.9.3-p392/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `initialize'
from /home/russian/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `new'
from /home/russian/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `mysql2_connection'
from /home/russian/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:315:in `new_connection'
from /home/russian/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:325:in `checkout_new_connection'
from /home/russian/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:247:in `block (2 levels) in checkout'
from /home/russian/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `loop'
from /home/russian/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `block in checkout'
from /home/russian/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
from /home/russian/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:239:in `checkout'
from /home/russian/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:102:in `block in connection'
from /home/russian/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
from /home/russian/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:101:in `connection'
from /home/russian/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:410:in `retrieve_connection'
from /home/russian/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:171:in `retrieve_connection'
from /home/russian/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in `connection'
from /home/russian/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record/railtie.rb:88:in `block in <class:Railtie>'
from /home/russian/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `instance_exec'
from /home/russian/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `run'
from /home/russian/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/russian/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `each'
from /home/russian/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `run_initializers'
from /home/russian/.rvm/gems/ruby-1.9.3-p392`enter code here`/gems/railties-3.2.13/lib/rails/application.rb:136:in `initialize!'
from /home/russian/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /home/russian/testing/config/environment.rb:5:in `<top (required)>'
from /home/russian/testing/config.ru:3:in `require'
from /home/russian/testing/config.ru:3:in `block in <main>'
from /home/russian/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
from /home/russian/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
from /home/russian/testing/config.ru:in `new'
from /home/russian/testing/config.ru:in `<main>'
from /home/russian/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
from /home/russian/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
from /home/russian/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
from /home/russian/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands/server.rb:46:in `app'
from /home/russian/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
from /home/russian/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
from /home/russian/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands/server.rb:70:in `start'
from /home/russian/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:55:in `block in <top (required)>'
from /home/russian/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
from /home/russian/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Can anyone help me with the problem?
You have to create the Database first.