Test your factories with rspec
Related cards:
How to use cucumber together with Sublime Text 2 Editor
Sublime Text 2 doesn't have out of the box support for cucumber and package control doesn't provide anything.
Adding support to run tests from within sublime text 2: [RubyText Package](https://...
Capybara, Selenium and VCR playing together nicely
When using capybara (for request specs) together with vcr while trying to run with selenium throws the following error:
VCR::Errors::UnhandledHTTPRequestError:
=============================================================...
Fixing "SocketError: getaddrinfo: Name or service not known" with Ruby's resolv-replace.rb
we had the same error and google helped us find the linked solution.
Just require "resolv-replace.rb"
during app startup and all should be good.
Further information:
- https://www.omniref.com/ruby/2.1.1/symbols/Resolv
- https://rubygems.org/g...
Reset mysql root password
Start mysql in safe mode: sudo mysqld_safe --skip-grant-tables
Connect to mysql
database with mysql mysql
Reset password with Update user Password = PASSWORD('root') where User = 'root' and HOST = 'loalhost';
Deployment in Rails 3.2.6 / Tinder Capistrano/ActiveSupport
Add
Capistrano::Configuration::Namespaces::Namespace.class_eval do
def capture(*args)
parent.capture *args
end
end
to your deploy.rb file to avoid syntax errors
Remove Trailing Spaces on Save in Sublime Text 2
Ever wondered how to get rid of the trailing spaces?
just add this to your user settings ( cmd + , ):
"trim_trailing_white_space_on_save": true
And every time you save a file Sublime will trim all the trailing spaces for you.
If you hav...
Using rubyzip dependent gem like 'axlsx' leads to LoadError (cannot load such file -- zip/zip)
The 'axlsx' gem (https://github.com/randym/axlsx) depends on rubyzip. After the bundle
command the error require': cannot load such file -- zip/zip (LoadError)
appeared by starting the rails server.
Possible solution: Add gem 'zip-zip'
to y...