Project

General

Profile

Bug #12404

rake console doesn't work on rails 4.1

Added by Tom Caspy almost 4 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Rails
Target version:
Difficulty:
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Related issues

Related to Foreman - Tracker #3157: Rails 4.1 upgrade tasksClosed2013-09-27

Associated revisions

Revision 41561f4d (diff)
Added by Tom Caspy almost 4 years ago

fixes #12404 - rake console now works

not sure whether ruby 2.1 is at blame, but IRB's initializer tries to
use the command line arguments to decide how to run the console.
problem? running rake console (--trace) will lead to ARGV to contain
["console"] (and maybe --trace), which, in turn, will run the
"MagicFile" method of running IRB, which, in turn, will fail because
there is no file named console.

It took me hours to go deep enough the rabbit hole to understand IRB's
super complex initialization process. And I ended up with this fix.

It basically does nothing in rails 3, and fixes the issue in rails 4.

History

#1 Updated by Tom Caspy almost 4 years ago

#2 Updated by The Foreman Bot almost 4 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2891 added

#3 Updated by Dominic Cleal almost 4 years ago

  • Category set to Rails
  • Legacy Backlogs Release (now unused) set to 71

#4 Updated by Tom Caspy almost 4 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF