“undefined method `accept' for nil:NilClass”

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?

On 14 August 2012 10:30, news.anand11 [email protected] wrote:

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

Googling for
rails migrate undefined method `accept’ for nil:NilClass
shows many hits with the same issue. Have you looked to see if any of
those help?

Colin

no any of them hasn’t helpful to me. I have also got the ans on stack
overflow but it hasn’t work for me. check this :

On 14 August 2012 12:01, news.anand11 [email protected] wrote:

no any of them hasn’t helpful to me. I have also got the ans on stack
overflow but it hasn’t work for me. check this :

Please don’t top post, it makes it difficult to follow the thread.
Insert your replies inline the previous message. Thanks.

Does the app work ok apart from not being able to run a particular
migration?

Do other apps work ok?

Can you post the files Gemfile and Gemfile.lock

Colin

On 14 August 2012 12:14, Colin L. [email protected] wrote:

Do other apps work ok?

Can you post the files Gemfile and Gemfile.lock

Also what happens when you run
bundle update mysql2
as suggested by others (post the output of the update command here).

Colin