Is there an easy way for the command line / console to check if the Rails application is correctly connected to MySQL?
Unfortunately, I cannot start the Rails console. He complains:
/home/nexargi/www/gi/vendor/ruby/1.9.1/gems/activerecord-3.2.1/lib /active_record/dynamic_matchers.rb:50:in `method_missing': undefined local variable or method `abddadhocbkgid' for
"abddadhocbkid" is the first attribute of the first table, so I think it does not control the connection to the mysql database. I need to find a way to check if Rails can connect to the mysql database without logging into the rails console.
Here is my model code:
class AdhocBkgDinersDiet < ActiveRecord::Base validates_presence_of :abddadhocbkgid, :abddmealdietid, :abddadultnos, :abddchildnos validates_numericality_of :abddadultnos, :abddchildnos, greater_than_or_equal_to: 0 belongs_to :adhoc_bkg, foreign_key:abddadhocbkgid belongs_to :meal_diet, foreign_key: :abddmealdietid end
nexar source share