undefined method `mysql_connection' for ActiveRecord::Base:Class
Thank's everyone
The error was resolve there is gem dependency issue
i have use gem mysql2 , activerecord-mysql2-adapter , mysql so there is conflicts error instead of it I have use only mysql2 gem change the adapter mysql to mysql2
Rake is aborting because undefined method `inet'
Use postgres_ext gem that supports enhanced datatypes of Postgres like inet.
An example postgres_ext: Adding Postgres data types to Rails.
postgres_ext adds migration and schema.rb support for the following PostgresSQL type:
- INET
- CIDR
- MACADDR
- UUID
- Arrays
On Migration: undefined method `to_sym' for nil:NilClass
This is a problem that I have had with rails migrations. You misspelled or misordered a field with its name. Here is what you can do.
- If you have only done one migration since the problem.
rake db:rollback
.- That will get you to the mistake and you can change the problem which I will talk about more later.
- If it is not the last migration keep going with
rake db:rollback
until you are there and the problem is fixed.
The problem is something like this. Notice the order on the first one and the spelling on the second one. These are two problems that have giving me the same situation you are in right now which is that to_sym
bs.
For example;
:books, :integer, :name #here I have `integer` before the name
:books, :name, :integr #here I have the order right but spelling is a problem.
Let me know if you have more questions.
If you cannot rake db:rollback
then make a new migration, drop the table giving the problem, and regenerate. I've had to do that before. Just make sure you get your order right.
Related Topics
Can't Run Ruby 2.2.3 with Rvm on Osx
Floating Point Precision in Ruby on Rails Model Validations
Detecting Regional Settings (List Separator) from Web
Ruby Strftime '%Z' Method Returns '0545' Instead of 'Npt'
How to Install Libksba on MAC Osx
Ruby, How to Access Local Variables Outside the Do - End Loop
Minitest, Test::Unit, and Rails
In Ruby How to Tell If a String Input Is in Uppercase or Lowercase
Remove a Tag But Keep the Text
Find Both Pattern and Position of Multiple Regex Matches in Ruby
Can't All or Most Cases of 'Each' Be Replaced with 'Map'
Why Are My Rspec Tests Failing, But My App Is Working
Generating Excel Documents with Ruby
Simple Remote Odbc Database Connection with Ruby
Cannot Install Any Ruby Gems on MAC Os - Ssl_Connect Error
Compare the Content, Not the Results, of Procs
Undefined Method 'Require_Relative' for Main:Object (Nomethoderror)