Command Line
pry -r ./config/app_init_file.rb
- load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb
- load your rails into a pry session
Debugger
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
/* | |
* jQuery.ajaxQueue - A queue for ajax requests | |
* | |
* (c) 2011 Corey Frang | |
* Dual licensed under the MIT and GPL licenses. | |
* | |
* Requires jQuery 1.5+ | |
*/ | |
(function(a){var b=a({});a.ajaxQueue=function(c){function g(b){d=a.ajax(c).done(e.resolve).fail(e.reject).then(b,b)}var d,e=a.Deferred(),f=e.promise();b.queue(g),f.abort=function(h){if(d)return d.abort(h);var i=b.queue(),j=a.inArray(g,i);j>-1&&i.splice(j,1),e.rejectWith(c.context||c,[f,h,""]);return f};return f}})(jQuery) |
Command Line
pry -r ./config/app_init_file.rb
- load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb
- load your rails into a pry sessionDebugger
* |
# config/initializers/active_record_uuid_ids.rb | |
Rails.application.config.generators do |generator| | |
# Always use UUIDs for primary keys (when generating migrations) | |
generator.orm :active_record, primary_key_type: :uuid | |
end |
On OS/X Sierra, after recently running a brew update
I started receiving the error message Sorry, you can't use byebug without Readline
when trying to run some rake tasks in my ruby project folder. I observed this in projects and gems that include byebug
or pry
in their Gemfile
or gem.spec
. I've found in my googling that many begin encountering this error message after running a brew update
but there are other triggering conditions as well.
>> rake aws:show_config
WARN: Unresolved specs during Gem::Specification.reset:
mime-types (>= 0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
Sorry, you can't use byebug without Readline. To solve this, you need to
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam' | |
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes' | |
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no' |
#!/bin/bash | |
PERMISSION="push" # Can be one of: pull, push, admin, maintain, triage | |
ORG="orgname" | |
TEAM_SLUG="your-team-slug" | |
# Get names with `gh repo list orgname` | |
REPOS=( | |
"orgname/reponame" | |
) |