Newsfeed

Rails: How can I specify a local gem with Bundler or in my Gemfile?

You can do the following in your Gemfile, but then you'd have to switch the Gemfile between development and production, which is not recommended:

# Gemfile 
gem "foo", path: "/path/to/foo" 

Alternatively, you can tell Bundler to use a local gem in your current environment. This is preferred as the Gemfile still points to the production version of the gem. Run this in shell:

 bundle config set local.GEM_NAME /path/to/local/git/repository

How to mock fetch and a state change in jest, react

tl;dr: I decided not to do it.

Since Enzyme is obsolete as of React 18, you would use <render /> and not <mount />. Therefore, you don't have a wrapper to manipulate and observe the state of the component being tested.

Furthermore, I'm really only testing the component because it's a best practice, and because of the expectation of future complexity. The state change itself is trivial:

[FIXED] Uncaught PHP Exception EntityStorageException: Invalid address: (to): at SqlContentEntityStorage.php line 815

Seeing this ^ error and currently don't know how to fix it. It happens only on some of my (presumably identically configured) websites. This is happening when a user attempts to post any comment.

Turns out, this was due to a workflow rule that attempted to email the author of a parent-comment and notify them that their comment has been replied to. Since there is no parent comment, there is no email to send a message to, which was causing the error.

How to disable Brave automatic updates - prevent Brave browser from auto-updating

The Brave browser strives to be an independent browser, neither controlled by Google, nor by Microsoft, nor by any other evil mega-corp like Amazon or Facebook. Unfortunately, it still keeps asking the user to update it, and does not give the option to reject the update without extra tweaking. (As reminder to corporations and developers: no means no. There is no "maybe later". It's a flat out no.)

July Market Conditions

As we delve into the market conditions of July 2024, a complex tapestry of economic factors comes into focus. This mid-summer month has been marked by significant events and trends that have shaped the financial landscape. From fluctuations in stock markets to shifts in commodity prices, and from economic policy changes to global geopolitical developments, July has been a month of noteworthy market activity.

A Comparison of Cloud-based and On-premise Installations

A cloud-based software installation refers to the deployment and use of software applications that are hosted on remote servers and accessed via the internet. Instead of being installed locally on individual computers or servers, the software resides on cloud infrastructure managed by a third-party provider. Users can access and use the software through web browsers or dedicated client applications, enabling them to leverage the benefits of scalability, flexibility, and remote accessibility.

An analysis of why Ruby on Rails is the best web-development framework

Ruby on Rails, often simply called Rails, is a web application framework written in Ruby. It was created by David Heinemeier Hansson and released in 2004. Rails is designed to make programming web applications easier by making assumptions about what every developer needs to get started. It allows developers to write less code while accomplishing more than many other languages and frameworks.