...which opens two database connections and uses active record for the legacy system, too: 1. Add you database information to you config/database.yml. data_migration: database: your_application_data_migration...

...in the migration models, e.g. app/data_migration/user.rb. class DataMigration::MigrationUser < DataMigration::MigrationRecord self.table_name = 'zz_1234_0' # you will need this if the table name is not data_migration_migration_users...

...time you run the rake task to rebuild your po files. Holy cow! Fix 1: Cheat Use the following hack to define classes inside your scripts and trick the gem...

...this step by step, do not just copy the whole thing into the console! # 1. Get old paths by doing something like this on the console: old_paths = ModelWithAttachment.all.collect { |m...

...jO4MJ316YleW9RCxp4TM5Eid5df30RCzN3rYlnIpyB0= is the same as the value in your cookie: { "session_id"=>"8ef662867ab2457717ba74c143c08733", "timestamp"=>1572261371, "_csrf_token"=>"jO4MJ316YleW9RCxp4TM5Eid5df30RCzN3rYlnIpyB0=" } Note: The session cookie is encrypted by default. You can decrypt it...

...that CSS selectors cannot do, add the following selector in selectors.rb: when /^"(.+?)" \(xpath\)$/ [:xpath, $1] Then use it like this: Then I should see "Application title" in the page source...

...which we were using for most Rails 2.3 projects, does not run on Ubuntu 14.04 any more. Here is how to update affected projects. Update (or create) .firefox-version with...

...with these versions: gem 'sanitize', '< 3' # 3+ depends on crass which depends on Ruby 1.9 gem 'cucumber_factory' Run bundle update on any added/changed gem, e.g. bundle update cucumber capybara...

Travis changed their default distribution from Ubuntu 14.04 (trusty) to 16.04 (precise). This might break your test setup for new builds. You can solve this issue by freezing your test...

...distribution in the .travis.yml to Ubuntu 14.04 until you have the time to solve all the issues you will have in 16.04: dist: trusty Error details Here are few indicators...

...I was asked to check my yarn integrity: error Integrity check failed error Found 1 errors. ======================================== Your Yarn packages are out of date! Please run `yarn install --check-files` to...

...bit ASCII value or UTF-8 codepoint (0-127) you can use Integer#chr: 116.chr # => "t" To get a character for values larger than 127, you need to pass the...

...intuitive, but does not require passing an encoding option. You need the U* directive. [116].pack('U*') # => "t" [252].pack('U*') # => "ü" Note that you must wrap your value numbers...

page.execute_script <<-JS field = $('#{field[:id]}') field.blur() field.fire('autocomplete:done') JS sleep 1 end In the javascript: /* * Listening on "blur" events does not work in tests because Firefox...

...s date picker and date time picker doesn't work on touch interfaces. Solution 1: Use Mobiscroll Another way is to detect touch devices and for those devices use the...

martin-riedl.de

...HLS, filled with real-world examples. Using FFmpeg as a HLS streaming server (Part 1) – HLS Basics Using FFmpeg as a HLS streaming server (Part 2) – Enhanced HLS Segmentation

...bzipped) file in bytes on the server (ls -l). In our case, it's 1234567890. Know your (local) MySQL root password. We'll use SECRET below. Know your (local) target...

...name. For us: my_project_development. Go wild: ^ ssh user@example.com "cat /mnt/dumps/my_project.dump.bz2" | pv -s 1234567890 | bzip2 -d | mysql -uroot -pSECRET my_project_development That will: Print the (bzipped) file to...

...you find an error like this in the apache error log: [ 2015-08-21 10:53:04.1266 17680/7f4909bf7700 Pool2/Implementation.cpp:883 ]: Could not spawn process for group /var/www/example.com/current#default: An error...

...Group::spawnThreadRealMain(const SpawnerPtr&, const Passenger::ApplicationPool2::Options&, unsigned int)' (Implementation.cpp:804) [ 2015-08-21 10:53:04.1273 17680/7f4907ae7700 agents/HelperAgent/RequestHandler.h:2210 ]: [Client 19] Cannot checkout session. Error page: This application is...

Ubuntu 12.04 LTS x64, Ruby 1.8.7, Rails 2.13, PDFKit 0.5.4, Phusion Passenger Apache 2 I ran into this, when I started using passenger to deal with the Single Thread Issue...

...an ActionController::RoutingError (No route matches "...") occurred. These steps brought me a little further (1) assert dependencies are installed sudo aptitude install openssl build-essential xorg libssl-dev

stackoverflow.com

Example (broken in IE): flex: 0 1 calc(50% - 20px) Workaround: flex-basis: calc(50% - 20px) flex-grow: 0 // Default, can be omitted for this example flex-shrink: 1 // Default...

...item that is current -> '.slider--item.is-current' when /^the (.+?)(?:'s (.+?)(?: that (.+))?)?$/ selector = '.' selector << selectorify($1) selector << '--' << selectorify($2) if $2 selector << '.' << selectorify($3) if $3 selector else raise "Can't...

...build/.htaccess with the following content: DirectorySlash Off Options -Indexes RewriteEngine On RewriteCond %{DOCUMENT_ROOT}/$1/index.html -f RewriteRule ^(.+?)/$ /$1 [R=301,L] RewriteCond %{DOCUMENT_ROOT}/$1/index.html -f RewriteRule ^(.+?)$ /$1/index.html [L]

...option to #overridable: Given /^there is a movie with a (.*?) tone$/ do ... end.overridable(priority: 1) Given /^there is a movie with a (sad|upbeat|disturbing) tone$/ do ... end.overridable(priority...

makandra dev

Lock haml to '= 3.1.7' Unlock andand Unlock rake Lock test-unit to '= 1.2.3' Lock database_cleaner to '< 1.3' Lock cucumber to '< 2' Lock launchy to '~> 2.1 ' Lock paperclip...

...It will simplify debugging failing features. require 'capybara-screenshot/cucumber' Capybara::Screenshot.prune_strategy = { keep: 12 } # parallel_tests TODO: Add rspec-patches gem from PH Code changes Remove UTF8 hints at...

Possible Reason 1: parallel_tests - running more processes than features If you run old versions of parallel_tests with more processes than you have Cucumber features, you will get errors...

markodenic.com

Table of content for the linked article: 1. The `loading=lazy` attribute 2. Email, call, and SMS links 3. Ordered lists `start` attribute 4. The `meter` element 5. HTML Native...

6. Fieldset Element 7. Window.opener 8. Base Element 9. Favicon cache busting 10. The `spellcheck` attribute 11. Native HTML sliders 12. HTML Accordion 13. `mark` tag 14. `download` attribute...

...the user setter you will receive an error (no method #email for nil). Workaround 1: Don't use clever setters Don't write clever setters. Set inferred attributes before validation...

Right-aligned items (align using a separator): Workspace switcher Configure three workspace named "1", "2", "3" Disable miniature views in the item preferences Action button for "Lock screen"