Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8398329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:01:33+00:00 2026-06-09T21:01:33+00:00

I am getting undefined method `accept’ for nil:NilClass error while running db:migrate. My configuration

  • 0

I am getting “undefined method `accept’ for nil:NilClass” error while running db:migrate. My configuration is:

Rails 3.2.8
MySql 5.1.54
OS : win7
ruby : 1.9.2

my gems list command output:

F:\RailsApp\MyApp>gem list

*** LOCAL GEMS ***

actionmailer (3.2.8)
actionpack (3.2.8)
activemodel (3.2.8, 3.1.0)
activerecord (3.2.8)
activeresource (3.2.8)
activesupport (3.2.8, 3.1.0)
arel (3.0.2)
bcrypt-ruby (3.0.1 x86-mingw32)
builder (3.0.0)
bundler (1.1.5)
coffee-rails (3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.3.3)
erubis (2.7.0)
execjs (1.4.0)
hike (1.2.1)
i18n (0.6.0)
journey (1.0.4)
jquery-rails (2.0.2)
json (1.7.4)
mail (2.4.4)
mime-types (1.19)
minitest (1.6.0)
multi_json (1.3.6)
mysql (2.8.1 x86-mingw32)
mysql2 (0.3.11 x86-mingw32, 0.2.6 x86-mingw32)
polyglot (0.3.3)
rack (1.4.1, 1.3.6)
rack-cache (1.2)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.2.8)
railties (3.2.8)
rake (0.9.2.2, 0.8.7)
rdoc (3.12, 2.5.8)
sass (3.2.0)
sass-rails (3.2.5)
sprockets (2.1.3)
thor (0.15.4)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.33)
uglifier (1.2.7)

I have also copy the %MYSQLPATH%/bin/libmySQL.dll file to %RUBYHOME%/bin folder.

Can anybody pleas help me to solve this problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T21:01:35+00:00Added an answer on June 9, 2026 at 9:01 pm

    Finally I have resolve the problem with reference to this post mysql2 gem compiled for wrong mysql client library.

    What I have done is as follows:

    1. download and extract the package from http://dev.mysql.com/get/Downloads/Connector-C/mysql-connector-c-noinstall-6.0.2-win32.zip/from/pick

    2. remove all mysql/mysql2 gem and re-install mysql gem with this command:
      gem install mysql --platform=ruby -- --with-mysql-dir=E:/mysql-connector-c-noinstall-6.0.2-win32

    3. add gem 'mysql' in GemFile

    4. modify database.yml with adapter:mysql

    5. copy MYSQLHOME/bin/libmsql.dll to RUBYHOME/bin

    6. if find dsl error then add require 'rake/dsl_definition' at top of RakeFile

    and it works.. 🙂

    My final GemFile is:

    source 'https://rubygems.org'
    gem 'rails', '3.2.3'
    gem 'mysql'
    group :assets do
      gem 'sass-rails',   '~> 3.2.3'
      gem 'coffee-rails', '~> 3.2.1'
      gem 'uglifier', '>= 1.0.3'
    end
    
    gem 'jquery-rails'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

undefined method 'key?' for nil:NilClass This is the error I am getting while going
I am getting undefined method [] for true:TrueClass error while running the rake task
I am getting an error: Undefined method build for nil:NilClass when trying to build
I'm getting the error: undefined method `model_name' for NilClass:Class when trying to call the
I keep getting a undefined method 'comments' for nil:NilClass in my create method when
I'm creating some basic OO scripts using MySQLi and getting an Undefined Method error
I'm getting this error : undefined method `has_many' for #<Formtastic::SemanticFormBuilder:0xb410d4c> It work when I
I'm getting a no method error in my Static_pages#home: undefined method `exists?' for Registry
I am getting the following error Fatal error: Call to undefined method MongoCollection::command() in
Doing the getting started of Sinatra. I get this error: ./sinatra.rb:5: undefined method `get'

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.