ankane / archer Goto Github PK
View Code? Open in Web Editor NEWRails console history for Heroku, Docker, and more
License: MIT License
Rails console history for Heroku, Docker, and more
License: MIT License
If I put archer-rails
in my Gemfile
and then try to use heroku run rails console
, I get the following exception:
Traceback (most recent call last):
8: from /app/vendor/bundle/ruby/2.7.0/gems/archer-rails-0.2.1/lib/archer/engine.rb:11:in `block (2 levels) in <class:Engine>'
7: from /app/vendor/bundle/ruby/2.7.0/gems/archer-rails-0.2.1/lib/archer.rb:47:in `save'
6: from /app/vendor/bundle/ruby/2.7.0/gems/archer-rails-0.2.1/lib/archer.rb:70:in `quietly'
5: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.0/lib/active_support/logger_silence.rb:18:in `silence'
4: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.0/lib/active_support/logger_thread_safe_level.rb:52:in `log_at'
3: from /app/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.0/lib/active_support/logger_silence.rb:18:in `block in silence'
2: from /app/vendor/bundle/ruby/2.7.0/gems/archer-rails-0.2.1/lib/archer.rb:71:in `block in quietly'
1: from /app/vendor/bundle/ruby/2.7.0/gems/archer-rails-0.2.1/lib/archer.rb:49:in `block in save'
/app/vendor/bundle/ruby/2.7.0/gems/archer-rails-0.2.1/lib/archer.rb:58:in `history_object': uninitialized constant Archer::Readline (NameError)
Did you mean? Reline
Strangely, this didn't happen the first time I brought up a Heroku Rails console after installing archer-rails
following the instructions, but only the second time and all times after (I wanted to check that the command history was working).
I've also tried having archer-rails
included for all groups instead of just production, as well as using heroku run bundle exec rails console
just in case, but I get the same error. I've added/run the migrations as per the instructions.
This is with Rails 6.1.0 under Ruby 2.7.2 with Bundler 2.2.4.
Hi there!
I had been looking at doing something similar to this project in order to aggregate IRB history into our observability platform for any executions that might happen within Heroku Dynos via Rails console, so we can have historical record of the activity and a general audit trail incase of incidents. Would you be open to accepting a pull request(s) that would extend this project in the following ways:
Adds a hook so that the history log entry could be sent or processed elsewhere (in our use case this would be New Relic)
Adds the ability to define a user callback method that gets executed to determine the default user to send. We use Heroku and we're looking at using the Heroku CLI to determine the authenticated user as a default.
I'm happy to submit a PR if you think those two pieces would be suitable for the project.
In some cases you might not want a session to be saved in the DB as clear text. Is there a way to maybe run a command before exiting that would let archer know not to save this session?
Multi-line commands seem to be broken up into their individual lines by Archer, which makes it hard to re-run them. Contrived example:
[1,2,3].each do |item|
puts item
end
Pressing up within the same console session restores the entire 3-line command, but upon starting a new console and pressing up, I can only select a single line, ex:
irb(main):001* [1,2,3].each do |item|
irb(main):002*
However, pressing the up arrow on the second line simply moves up to the first line, instead of letting me choose the puts item
line from the history to even attempt to piece the multi-line command back together.
Hi,
Thanks for this awesome gem.
Is there a way I can set a new user for every session so that it doesn't keep updating the same record? It could be something like current date time.
How can I achieve that?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.