To get parent of Capybara's node do the following: node = page.find '#selector' parent = node.find(:xpath, '..') parent_of_parent = node.find(:xpath...
All examples here for deploy RoR application with unicorn, staging machine (where we deploys) available via ssh by ssh_key. Deploy via remote_cache: require 'rvm/capistrano' require 'bundler/capistrano' set :application...
set :rails_env, 'production' set :domain, '_user@your_deploy_domain_' set :deploy_to, "_path_to_#{application}" set :use_sudo, false set :unicorn_conf, "#{deploy_to}/current/config/unicorn.rb" set :unicorn_pid...
Download build agent archive from your TeamCity server: wget http://your_teamcity.server.com:8111/update/buildAgent.zip Unzip it in separate directory: mkdir buildAgent ^ mv buildAgent.zip buildAgent ^ cd buildAgent ^ unzip buildAgent.zip ^ chown -R your_user...
...your_group ../buildAgent Copy agent's settings file: cp conf/buildAgent.dist.properties conf/buildAgent.properties Edit this file: nano conf/buildAgent.properties There are fields which you must update: # your TeamCity server address: serverUrl=http://your_teamcity.server.com:8111...
Add in Gemfile: group :development, :test do gem 'rspec-rails' gem 'spork-rails' end group :test do gem 'capybara' gem 'database_cleaner' gem 'email_spec' gem 'poltergeist' gem 'launchy'
...selenium-webdriver' end Run bundle install Ensure your spec_helper.rb looks similar with this: require 'rubygems' require 'spork' #uncomment the following line to use spork with the debugger # require 'spork/ext/ruby-debug'
This tutorial is about setting up environment for RubyOnRails on Ubuntu 14.04. First of all, update & upgrade your system: sudo apt-get update ^ sudo apt-get upgrade ^ Install git and...
sudo apt-get install curl ^ sudo apt-get install git-core ^ Configure git: git config --global user.name "Your Name" ^ git config --global user.email email@example.com ^ Install RVM:
Suppose we have some model and we want to localize it, first of all we need to now i18n_key for that model. Open rails console rails c, and run...
Visit PhantomJS site, go to download page and copy link address for Linux, in our case this is https://phantomjs.googlecode.com/files/phantomjs-1.9.2-linux-x86_64.tar.bz2 Then go to console and run following commands:
...apt-get install libfontconfig libfontconfig-dev libfreetype6-dev ^ wget https://phantomjs.googlecode.com/files/phantomjs-1.9.2-linux-x86_64.tar.bz2 ^ sudo mv phantomjs-1.9.2-linux-x86_64.tar.bz2 /opt ^ cd /opt ^ tar -xvf phantomjs-1.9.2-linux-x86_64.tar.bz2 ^ ln -s /opt/phantomjs-1.9.2-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs
Best results in other decks
What is netfilter's Connection Tracking system? The connection tracking system often referenced as nf_conntrack is part of the Netfilter framework. It allows the Linux kernel to keep track...
...of all logical network connections and sessions. In combination with iptables this feature is used to achieve a stateful firewall. Why to care about nf_conntrack? All connections are stored...
...development PCs so we can operate multiple versions of Node.js in parallel. To make sure that all developers use a compatible version of Node.js, your Rails project should declare the...
...Node version as you cd into a directory. We have a card about automatically switch version when changing directories which provides a solution that works very well for us.