Error "undefined method `accept' for nil:NilClass" after upgrading to rails 3.2 #4632
Getting the error
$ ruby --version ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.0.0]
RAILS FRAMEWORK TRACE
source 'http://rubygems.org' gem 'rails', '3.2.0' gem 'mysql2', '0.2.6' # Gems used only for assets and not required in production by default. group :assets do gem 'sass-rails', '~> 3.2.3' gem 'coffee-rails', '~> 3.2.1' # See https://github.com/sstephenson/execjs#readme for more supported runtimes # gem 'therubyracer' gem 'uglifier', '>= 1.0.3' end # Deploy with Capistrano # gem 'capistrano' gem 'rabl' # To use ActiveModel has_secure_password # gem 'bcrypt-ruby', '~> 3.0.0' # Use unicorn as the web server # gem 'unicorn' # Deploy with Capistrano # gem 'capistrano' # To use debugger # gem 'ruby-debug19', :require => 'ruby-debug' group :development, :test do gem 'annotate' gem 'simplecov' end
$ bundle show Gems included by the bundle: * actionmailer (3.2.0) * actionpack (3.2.0) * activemodel (3.2.0) * activerecord (3.2.0) * activeresource (3.2.0) * activesupport (3.2.0) * annotate (2.4.0) * arel (3.0.0) * builder (3.0.0) * bundler (1.0.21) * coffee-rails (3.2.1) * coffee-script (2.2.0) * coffee-script-source (1.2.0) * erubis (2.7.0) * execjs (1.3.0) * hike (1.2.1) * i18n (0.6.0) * journey (1.0.0) * json (1.6.5) * mail (2.4.1) * mime-types (1.17.2) * multi_json (1.0.4) * mysql2 (0.2.6) * polyglot (0.3.3) * rabl (0.5.3) * rack (1.4.1) * rack-cache (1.1) * rack-ssl (1.3.2) * rack-test (0.6.1) * rails (3.2.0) * railties (3.2.0) * rake (0.9.2.2) * rdoc (3.12) * sass (3.1.12) * sass-rails (3.2.3) * simplecov (0.5.4) * simplecov-html (0.5.3) * sprockets (2.1.2) * thor (0.14.6) * tilt (1.3.3) * treetop (1.4.10) * tzinfo (0.3.31) * uglifier (1.2.2)
After reviewing this with davicelis on #rubyonrails IRC, I removed the specific version on the mysql gem. Updating bundle after this pulled in
1 similar comment
I am facing same issue 'rake aborted! undefined method `accept' for nil:NilClass'
The details are as follows:
RAILS FRAMEWORK TRACE:
** Invoke db:migrate (first_time)
gem 'rails', '3.2.0'
group :assets do
See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'uglifier', '>= 1.0.3'
*** LOCAL GEMS ***
actionmailer (3.2.0, 3.2.0.rc2)
****what should I modify in my gemfile, I am facing same isse from 2 days and now I am blocked on this issue:
Same here - activerecord-oracle_enhanced-adapter
For the mysql, postgresql, sqlite adapters; It looks like the
Looks like an adapter-related issues
mysqljdbc_adapter.rb contains oly following line inside it:
I am using following versions:
Is all these versions are compatibe. Or I have to change any of these versions.
Also I got the following error when I run one simple app:
SEVERE: There is no installed container capable of handling this application Myapp:
(I am tryong to run the application which is given on site: http://netbeans.org/kb/68/ruby/rails-quickstart.html )
Please Help me; Or at least give me simple ruby on rails appn which run on Netbeans: I just want to see web-page displaying simple html table' ( No need to take values fron db: I just want to see web-page having simple html tags)
[2012-02-06 10:54:53] INFO going to shutdown ...
-- control frame ----------
c:0001 p:0000 s:0002 b:0002 l:0019c4 d:0019c4 TOP
This application has requested the Runtime to terminate it in an unusual way.
I was just experiencing the same error. Basically, what was happening is the params[:id] attribute is being overwritten because a file was not found, so when I was looking up User.find(params[:id]), :id was returning "favicon." In my case, in my template file, the favicons were not pointing to the correct location.
It's worth checking that additionally in the future; however, I don't believe rails should be rewriting the ID values returned to the controller.
@dougc84 The error message seen on this issue can appear on a number of different error scenarios. The stack trace is what describes the actual issue. If you think rails is incorrectly changing a value in the params collection, that could be a separate bug, so open an issue with more details.
I did the same, updated to 0.3.11 but the issue is not fixed. I got the error on my development environment OSX and the staging environment on Ubuntu 12.04 LTS. My output when I'm calling: bundle exec rake db:migrate --trace
Tasks: TOP => db:migrate
and the list of gems I'm using
Using rake (0.9.2.2)