OpenAI is currently limiting the Audio generating API endpoint to text bodies with a maximum of 4096 characters.

When using Rails to truncate strings, you may end up with strings that are still too long for their container...

To set a cookie in your test browser for cucumber tests, you need to know which driver you are using...

So your Cucumber feature sometimes dies with this exception: Modal Dialog Present (Selenium::WebDriver::Error::UnhandledAlertError) As a seasoned Selenium...

makandra dev

This may be awkward to set up, but will work once you're done. Fun facts:

Here is how to start your Rails application to accept both HTTP and HTTPS in development. gem install passenger

getpostman.com

Talking with APIs makes more fun using Postman. As an alternative you can also use command line tools like cURL...

Sidekiq 7 adds a new feature called capsules. Use cases: a chrome queue limited to 1 for e.g. PDF processing...

s keeps saturation unchanged. calc(100 - l) inverts lightness. For example, 0% becomes 100%, and 100% becomes 0%. Example usage .demo { --inverted-color: hsl(from currentColor calc(h...

Webpack is the future. We're using it in our latest Rails applications. For tests, we want to compile assets...

I recently noticed that better_errors allows you to to open files from within your favorite editor. However it was not so easy to get rubymine:// links to work on...

...Does xdg-open "rubymine:///etc/hosts" open the hosts-file in RubyMine? Step 4: Tell better_errors to use your opener The BETTER_ERRORS_EDITOR_URL environment variable can be used...

I recently stumbled over a quirk in the way Ruby handles local variables that I find somewhat dangerous. Consider:

We recently migrated a Rails application from yarn to npm. We decided to go this step instead of upgrading to...

...fills in the query "foo" Also see An auto-mapper for ARIA labels and BEM classes in Cucumber selectors

rspec.info

In modern default RSpec configurations, your tests are usually run in random order. This helps to detect "flickering" tests that...

jsbin.com

If you try to listen to events on elements that are nested inside a , Firefox will stop event propagation once...

It is quite easy to migrate from CoffeeScript to ES6. You can use decaffeinate to convert your CoffeeScript source to...

...a? Capybara::Driver::Selenium Now the selenium driver is located by Capybara::Driver::Selenium. A better-looking approach would be: Capybara.current_driver == :selenium page.response_headers['Content-Disposition'] should be page.response.headers...

Using Capistrano, we usually have some array configurations in the config/deploy.rb file, like set :linked_files, %w[config/database.yml], so in...

Element finding is a central feature of Capybara. Since #find is normally used to get elements from the current page...

apidock.com

Note: ActiveRecord::Base#becomes has a lot of quirks and inconsistent behavior. You probably want to use ActiveType.cast instead. ActiveRecord models have with a method becomes(klass) which you can...

Large Rails projects tend to define multiple custom ways to format Dates or DateTimes. This often leads to duplicated format...

Disclaimer This card is a collection of guides and things to have in mind when upgrading to a specific version...

To avoid multiple versions of a package, you can manually maintain a resolutions section in your package.json. We recommend you...