Skip to content

Commit

Permalink
Merge pull request #84 from rage-rb/console-activerecord
Browse files Browse the repository at this point in the history
Correctly init console in Rails mode
  • Loading branch information
rsamoilov authored May 7, 2024
2 parents 4f3d70a + 38e7dd7 commit 70633d4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/rage/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,8 @@ def console
def environment
require File.expand_path("config/application.rb", Dir.pwd)

# in Rails mode we delegate code loading to Rails, and thus need
# to manually load application code for CLI utilities to work
if Rage.config.internal.rails_mode
require "rage/setup"
require File.expand_path("config/environment.rb", Dir.pwd)
end
end

Expand Down

0 comments on commit 70633d4

Please sign in to comment.