Rod Klingler

Joined

5,810 Experience
57 Lessons Completed
0 Questions Solved

Activity

Posted in How to write System Tests in Rails Discussion

Yeah, weird. I looked at the video again after posting that, and checked that I have the :fixtures and everything else set up just as you do, but my system tests are definitely pulling my local data.

Posted in How to write System Tests in Rails Discussion

I think it should be mentioned that system tests use whatever data you have already seeded into your local environment instead of your fixtures, which is what the controller tests use. This confused me at first. I was testing for the presence of fixture data, LOL.

Posted in Testing External APIs with VCR Discussion

I looked at VCR in the past and was a little intimadeted by it. Now that I have tried it, all I can say is how amazing it is!

For n00bs, it is worth noting that after putting the configuration in place in your test_helper.rb file, you can run your tests and it will warn you when it notices an API request, so you know which files to go back and add the setup/teardown to.

Posted in Tracking Metrics with Ahoy and Blazer Discussion

No, it turns out I have a Rails 5 app that uses Webpacker, and what I implemented was apparently causing confusion in my app. I took the Webpacker stuff out and it works fine now. Thanks, anyway!

Posted in Tracking Metrics with Ahoy and Blazer Discussion

Hey, Chris! It looks like a lot has changed with ahoy in the past two years. Any way you could update this?

Posted in Ruby's Array() and Array.wrap Discussion

Nice, dude! I had no idea this existed. I'll definitely be using this when I go back through and optimize my code. Thanks!

Posted in Direct File Uploads to S3: Part 2 Discussion

Here is the Stacktrace:

Traceback (most recent call last):
    93: from bin/rails:3:in `<main>'
    92: from bin/rails:3:in `load'
    91: from /Users/safetypros-web/Sites/Jumpstart/version_1/bin/spring:15:in `<top (required)>'
    90: from /Users/safetypros-web/Sites/Jumpstart/version_1/bin/spring:15:in `require'
    89: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
    88: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
    87: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
    86: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
    85: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
    84: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
    83: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
    82: from /Users/safetypros-web/Sites/Jumpstart/version_1/bin/rails:9:in `<top (required)>'
    81: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
    80: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in `load_dependency'
    79: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `block in require'
    78: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
    77: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
    76: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
    75: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
    74: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
    73: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/railties-5.2.2/lib/rails/commands.rb:18:in `<main>'
    72: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/railties-5.2.2/lib/rails/command.rb:46:in `invoke'
    71: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/railties-5.2.2/lib/rails/command/base.rb:65:in `perform'
    70: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
    69: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
    68: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
    67: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/railties-5.2.2/lib/rails/commands/server/server_command.rb:142:in `perform'
    66: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/railties-5.2.2/lib/rails/commands/server/server_command.rb:142:in `tap'
    65: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/railties-5.2.2/lib/rails/commands/server/server_command.rb:147:in `block in perform'
    64: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/railties-5.2.2/lib/rails/commands/server/server_command.rb:51:in `start'
    63: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/railties-5.2.2/lib/rails/commands/server/server_command.rb:89:in `log_to_stdout'
    62: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/rack-2.0.6/lib/rack/server.rb:354:in `wrapped_app'
    61: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/railties-5.2.2/lib/rails/commands/server/server_command.rb:27:in `app'
    60: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/rack-2.0.6/lib/rack/server.rb:219:in `app'
    59: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/rack-2.0.6/lib/rack/server.rb:319:in `build_app_and_options_from_config'
    58: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/rack-2.0.6/lib/rack/builder.rb:40:in `parse_file'
    57: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/rack-2.0.6/lib/rack/builder.rb:49:in `new_from_string'
    56: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/rack-2.0.6/lib/rack/builder.rb:49:in `eval'
    55: from config.ru:in `<main>'
    54: from config.ru:in `new'
    53: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/rack-2.0.6/lib/rack/builder.rb:55:in `initialize'
    52: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/rack-2.0.6/lib/rack/builder.rb:55:in `instance_eval'
    51: from config.ru:3:in `block in <main>'
    50: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:44:in `require_relative'
    49: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
    48: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in `load_dependency'
    47: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `block in require'
    46: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
    45: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
    44: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
    43: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
    42: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
    41: from /Users/safetypros-web/Sites/Jumpstart/version_1/config/environment.rb:5:in `<main>'
    40: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/railties-5.2.2/lib/rails/application.rb:361:in `initialize!'
    39: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/railties-5.2.2/lib/rails/initializable.rb:60:in `run_initializers'
    38: from /Users/safetypros-web/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:205:in `tsort_each'
    37: from /Users/safetypros-web/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:226:in `tsort_each'
    36: from /Users/safetypros-web/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:347:in `each_strongly_connected_component'
    35: from /Users/safetypros-web/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:347:in `call'
    34: from /Users/safetypros-web/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:347:in `each'
    33: from /Users/safetypros-web/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:349:in `block in each_strongly_connected_component'
    32: from /Users/safetypros-web/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:415:in `each_strongly_connected_component_from'
    31: from /Users/safetypros-web/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:415:in `call'
    30: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/railties-5.2.2/lib/rails/initializable.rb:50:in `tsort_each_child'
    29: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/railties-5.2.2/lib/rails/initializable.rb:50:in `each'
    28: from /Users/safetypros-web/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
    27: from /Users/safetypros-web/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:431:in `each_strongly_connected_component_from'
    26: from /Users/safetypros-web/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
    25: from /Users/safetypros-web/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
    24: from /Users/safetypros-web/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/tsort.rb:228:in `block in tsort_each'
    23: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/railties-5.2.2/lib/rails/initializable.rb:61:in `block in run_initializers'
    22: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/railties-5.2.2/lib/rails/initializable.rb:32:in `run'
    21: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/railties-5.2.2/lib/rails/initializable.rb:32:in `instance_exec'
    20: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/railties-5.2.2/lib/rails/engine.rb:613:in `block in <class:Engine>'
    19: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/railties-5.2.2/lib/rails/engine.rb:613:in `each'
    18: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/railties-5.2.2/lib/rails/engine.rb:614:in `block (2 levels) in <class:Engine>'
    17: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/railties-5.2.2/lib/rails/engine.rb:656:in `load_config_initializer'
    16: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.2/lib/active_support/notifications.rb:170:in `instrument'
    15: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/railties-5.2.2/lib/rails/engine.rb:657:in `block in load_config_initializer'
    14: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:285:in `load'
    13: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in `load_dependency'
    12: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:285:in `block in load'
    11: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:50:in `load'
    10: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:50:in `load'
     9: from /Users/safetypros-web/Sites/Jumpstart/version_1/config/initializers/shrine.rb:19:in `<main>'
     8: from /Users/safetypros-web/Sites/Jumpstart/version_1/config/initializers/shrine.rb:19:in `new'
     7: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/shrine-2.16.0/lib/shrine/storage/s3.rb:79:in `initialize'
     6: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/aws-sdk-core-3.46.2/lib/seahorse/client/base.rb:99:in `new'
     5: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/aws-sdk-s3-1.30.1/lib/aws-sdk-s3/client.rb:262:in `initialize'
     4: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/aws-sdk-core-3.46.2/lib/seahorse/client/base.rb:21:in `initialize'
     3: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/aws-sdk-core-3.46.2/lib/seahorse/client/base.rb:77:in `after_initialize'
     2: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/aws-sdk-core-3.46.2/lib/seahorse/client/base.rb:77:in `each'
     1: from /Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/aws-sdk-core-3.46.2/lib/seahorse/client/base.rb:78:in `block in after_initialize'
/Users/safetypros-web/.rvm/gems/ruby-2.5.1/gems/aws-sdk-core-3.46.2/lib/seahorse/client/plugins/endpoint.rb:29:in `after_initialize': missing required option `:endpoint' (ArgumentError)

The :endpoint is NOT missing. It is stored in ENV['AWS_HOST'] and returns the appropriate string.

Posted in Direct File Uploads to S3: Part 2 Discussion

Hey, Chris! According to the Shrine plugins page, "direct_upload is [OBSOLETE]" and they want you to "Use upload_endpoint and presign_endpoint plugins instead." I have been following along with this video and having problems getting it to work. Specifically, I get to about 9:45 and then my rails server won't start, nor, I discovered, will the rails console.

Going back through the video again, I noticed that the roda gem is for presigned endpoints, which is exactly what one of the newer Shrine plugins is supposed to be for. Could this be the problem?

Posted in Multitenancy with the Apartment gem Discussion

I would really like to know the answer to this! It would be great to offer ActiveAdmin functionality to each Company in a subdomain. If I figure it out I will post here.

I figured my own problem out, finally. It is a <ul> and each <li> in the dropdown has the ui-menu-item class, and that's really all you need to attach the styling to, plus :hover for some feedback when the user mouses over the list items. Hope this helps someone else!

Hey man, I can't figure out how to style the suggestions that show up beneath the search bar. Any links or ideas? I keep trying to Google this in different ways but I'm still coming up emptyhanded.

logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2020 GoRails, LLC. All rights reserved.