PATH=/opt/firefox-for-selenium:$PATH cucumber features/foo.feature Issues When you get the following error: ./firefox-bin: 1: Syntax error: "(" unexpected ... then you have a 32 bit Linux but downloaded a 64 bit...
j and k to navigate in the diff u again to stage/unstage chunks 1 to stage/unstage only lines \ to split large chunks F5 to refresh the view
...the gem from /usr/lib/ruby/gems/1.8/gems/foolib-1.2.3 to vendor/gems/foolib-1.2.3. Make sure the folder name actually ends in ...-1.2.3. cd to the gem. Check if a foolib.gemspec exists. If it doesn't, run rake...
...allocate SQLHENV from /usr/lib/ruby/1.8/dbd/odbc/driver.rb:36:in `connect' from /usr/lib/ruby/1.8/dbi/handles/driver.rb:33:in `connect' from /usr/lib/ruby/1.8/dbi.rb:148:in `connect' from (irb):1 from /usr/local/lib/site_ruby/1.8/rubygems/dependency_list.rb:14 I installed the gem ruby-odbc instead...
...store its content in a buffer and write it into the file system every 1000 lines. This will come back to bite you when using Rails.logger.info to write log output...
...to write after each line. On production environments the Rails logger writes only every 1000 lines -- and not upon shell or script termination as you might expect -- so Rake tasks...
...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...
...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...
...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
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...
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...
...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...