Now you can connect into your Rails Console directly from project folder!
Add this line to your application's Gemfile:
gem 'railsconsole'
And then execute:
$ bundle
Or install it yourself as:
$ gem install railsconsole
require 'rails_console'
RailsConsole.setup do |config|
# you can set a different path of deploy file
config.deploy_file = 'config/mydeploy.rb'
end
require 'rails_console'
RailsConsole.connection
After install railsconsole on your environment, run this script:
$ railsconsole
Loading production environment (Rails 5.2.1)
irb(main):001:0>
After checking out the repo, run bin/setup
to install dependencies. You can also run bin/console
for an interactive prompt that will allow you to experiment.
Bug reports and pull requests are welcome on GitHub at https://github.com/formaweb/railsconsole.
The gem is available as open source under the terms of the MIT License.