Actions defined using resource get bypass the controller #7910

rubys opened this Issue Oct 11, 2012 · 9 comments


None yet
4 participants

rubys commented Oct 11, 2012

Simple reproduction scenario

Changing the controller method to log or do something that will fail (like call an undefined method) shows that the method is never called.

Originally seen as a part of the Agile Web Development with Rails tests

d695fdb is the first commit showing the failure
a8f6d5c is the last commit where the scenario passes


georgebrock commented Oct 21, 2012

I've followed @rubys' scenario and I couldn't reproduce the issue using any of the following versions of Rails, and various versions of the dependancies:

  • The master branch (currently at cec66e5)
  • The commit that apparently introduced the issue (d695fdb)
  • The commit mentioned at the bottom of the scenario (cd98c25).

For the two tests with older versions of Rails I modified the Gemfile of my test application to make sure I was using the exact same revisions of the gems that are installed from GitHub as had been used in @rubys' original test (using the bundle show output at the bottom of his scenario). I also tried running these with the newest versions of the dependancies that were compatible with those versions of Rails.

For the master test I used the default Gemfile generated by rails new --dev, which points to the latest versions of everything on GitHub.


steveklabnik commented Oct 21, 2012

Hmm. @rubys, it seems like the AWDwR tests haven't been run in a while, is that true?


rubys commented Oct 21, 2012

AWDwR are definitely still running:

I tried running /home/rubys/git/rails/railties/bin/rails new depot --dev from the command line, and got:

Updating git://
Fetching gem metadata from
Error Bundler::HTTPError during request to dependency API
Fetching full source index from
Using rake ( 

And then running rails generate scaffold Product title:string produces:

/home/rubys/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find railties (>= 0) amongst [active_utils-1.0.5, activemerchant-1.28.0, activesupport-3.2.8, ansi-1.4.3, arel-2.2.3, bcrypt-ruby-3.0.1, builder-3.1.4, builder-3.0.4, bundler-1.2.1, capistrano-2.13.4, coffee-script-2.2.0, coffee-script-source-1.3.3, erubis-2.7.0, execjs-1.4.0, haml-3.1.7, highline-1.6.15, hike-1.2.1, htmlentities-4.3.1, i18n-0.6.1, jquery-rails-2.1.3, json-1.7.5, kaminari-0.14.1, mail-2.4.4, mail-2.3.3, mime-types-1.19, minitest-4.1.0, money-5.0.0, multi_json-1.3.6, multi_json-1.2.0, mysql2-0.3.11, net-scp-1.0.4, net-sftp-2.0.5, net-ssh-2.6.1, net-ssh-gateway-1.1.0, nokogiri-1.5.5, polyglot-0.3.3, rack-1.4.1, rack-1.3.6, rack-cache-1.2, rack-mount-0.8.3, rack-ssl-1.3.2, rack-test-0.6.2, rake-, rdoc-3.12, rubygems-bundler-1.1.0, rvm-, sass-3.2.1, sprockets-2.8.0, sprockets-2.0.4, sqlite3-1.3.6, test-unit-2.5.2, thor-0.16.0, thor-0.14.6, tilt-1.3.3, treetop-1.4.11, turbolinks-0.5.1, turn-0.8.3, tzinfo-0.3.33, uglifier-1.3.0, will_paginate-3.0.3] (Gem::LoadError)
from /home/rubys/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
from /home/rubys/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in `gem'
from /home/rubys/.rvm/gems/ruby-1.9.3-p286/bin/rails:22:in `<main>'

Can somebody share a Gemfile that does work with a recent clone of Rails master?


georgebrock commented Oct 21, 2012

Hi @rubys,

This is the Gemfile I used with Rails cd98c25 and d695fdb to try and reproduce your test setup

When I was trying to reproduce the bug against master I had no problem with the Gemfile that was generated by rails new. The exact commands I used were:

rails/railties/bin/rails new issue7910 --skip-bundle --dev
cd issue7910
bundle install --path .bundle
bundle exec rails g scaffold Product title:string
rake db:migrate
bundle exec rails s

steveklabnik commented Oct 21, 2012

Ah, awesome, I was looking in the wrong place. :(


steveklabnik commented Oct 21, 2012

Error Bundler::HTTPError during request to dependency API

Yeah, the RubyGems dependency API is down.


rubys commented Oct 21, 2012

Indeed it was my problem:


Explanation: the upside of having an automated test suite is that is can tell quickly and with precision what commit caused the results to change. The downside of an automated test suite is that it doesn't have common sense. In this case it correctly identified the Rails commit that caused the change, but that's not the complete story. Adding a method at the end of the class used to work, but doesn't any more as there now is a private section. :-P

@rubys rubys closed this Oct 21, 2012


steveklabnik commented Oct 22, 2012

:D awesome.


guilleiguaran commented Oct 22, 2012


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment