If you get e.g. this error message when you try to run puppet agent: Error: Failed to apply catalog: undefined...

github.com

We have a new gem Minidusen which extracts Dusen's query parsing and LIKE query functionality. Minidusen can no longer...

...returns Promise.reject("error") await foo() // throws "error" As an alternative you can use the behavior that exceptions thrown in promise callbacks will automatically be caught and converted to a rejected...

throw "No x given" } else return new Promise(function(resolve, reject) { ... }); } }); } This behavior is in all Promises/A+ compatible implementations like native promises, jQuery 3+ deferreds or Bluebird. Deferreds...

#reverse_order does not work with complex sorting constraints and may even silently create malformed SQL for rails < 5.

makandra dev

Sometimes your code has long lines: describe 'foo' do describe 'bar' do really_long_line_really_long_line_really_long...

...managed by nova-compute. I didn't manage to find the cause of this behaivour yet, but I think it has something to do with the start order of the...

Watch out when saying something like 1.year in Rails. The result is not a Fixnum and can cause unexpected errors...

makandra dev

There is no good equivalent for the Unix sudo command in Windows. Below are a few workarounds that are all...

We sometimes send calender data or tasks using iCalendar (ICS) via eMail as specified in RFC 5545. Recently, a customer...

Internet Explorer 5+ is aware of conditional comments that let you target HTML for selected versions of IE. For example...

Ruby's regular expressions can be represented differently. When serializing them, you probably want to use inspect instead of to...

With "attaching an event handler once" you possibly mean one of these two things: Register a function for an event...

makandra dev
github.com

Gem to provide nice looking urls ("/blog/the-greatest-bug-i-never-fixed"). If you don't need anything too special (like i18n for the urls...

It's generally not trivial to change a datetime's seconds, minutes, etc in SQL. Here is how it works...

Occasionally some complex query must be processed on the database because building thousands of Ruby objects is impracticable.

...means that every require 'spec/something' must now be require 'rspec/something'. In spec_helper.rb, Spec::Runner.configure becomes RSpec.configure It has become really hard to extend specific example groups in rspec-rails (e.g...

makandra dev

To change RAM size, VDISK size or VCPU count of an openstack instance you have to use nova resize. You...

In your Cucumber features you can't really click hidden elements when using Selenium (it does work for a plain...

The way MySQL's FULLTEXT tokenizer splits text into word tokens might not always be what you need. E.g. it...

makandra dev

If you use a form (or form fields) multiple times inside one view, Rails will generate the same id attributes...

So you probably see the following error trace within your Passenger log file if you got here:

We ran into trouble when adding additional compute units to our railscomplete Hosting environment lately. VM-instances on the new...

Regular expressions can have something called "zero-width look-behind assertions". This means that you want a pattern to be preceded by another pattern, but not include the preceding pattern...

...y matches y in xyz but not in syz. There are also negative look-behind assertions, e.g. (?<!x)y matches y in syz but not in xyz. Unfortunately look-behind...

I don't like those buttons inside the header area of a message that Thunderbird 3 put there. Though the...