follow me icons

Wednesday, September 14, 2016

Remove RVM on OSX and switch to RBENV

$ rvm implode
Psychologist intervened, cancelling implosion, crisis avoided :)

$ rvm implode --force
Are you SURE you wish for rvm to implode?
$ This will recursively remove /home/local/.rvm and other rvm traces? yes

Exit and reopen the terminal

Update Ruby-Build definition in OSX

$ rbenv install 2.1.3
ruby-build: definition not found: 2.1.3

You can list all available versions with `rbenv install --list'.

If the version you're looking for is not present, first try upgrading
ruby-build. If it's still missing, open a request on the ruby-build

issue tracker:

$ sudo brew uninstall ruby-build
Uninstalling /usr/local/Cellar/ruby-build/20140702...

$ sudo brew install --HEAD ruby-build
==> Cloning
Cloning into '/Library/Caches/Homebrew/ruby-build--git'...
remote: Counting objects: 343, done.
remote: Compressing objects: 100% (276/276), done.
remote: Total 343 (delta 147), reused 154 (delta 63), pack-reused 0
Receiving objects: 100% (343/343), 88.76 KiB | 126.00 KiB/s, done.
Resolving deltas: 100% (147/147), done.
Checking connectivity... done.
==> ./

$ rbenv install 2.1.3
Downloading ruby-2.1.3.tar.bz2...


Thursday, November 26, 2015

How to Output cucumber results in STDOUT or console and as a html report

If you need to output the cucumber result both as a html report and to STDOUT you can use the -f rerun --out rerun.txt. This will be useful if you run the cucumber in jenkins where you want to see the html report as well as to follow the progress of your test.

bundle exec cucumber -f pretty -f html --out report.html -f rerun --out rerun.txt features\regression\ --tag @test

Saturday, November 21, 2015

How to Install Gem Debugger in Ruby

To install debugger -> try using 'gem install debugger2' instead of debugger. 

Installing debugger-ruby_core_source 1.3.8
/Users/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:73: warning: Insecure world writable dir /usr/local in PATH, mode 040777

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /Users/.rbenv/versions/2.1.2/bin/ruby extconf.rb 
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
/Users/.rbenv/versions/2.1.2/lib/ruby/2.1.0/fileutils.rb:1573:in `stat': No such file or directory @ rb_file_s_stat - ./212/ruby_debug.h (Errno::ENOENT)
from /Users/osx/.rbenv/versions/2.1.2/lib/ruby/2.1.0/fileutils.rb:1573:in `block in fu_each_src_dest'
from /Users/osx/.rbenv/versions/2.1.2/lib/ruby/2.1.0/fileutils.rb:1587:in `fu_each_src_dest0'
from /Users/mac/.rbenv/versions/2.1.2/lib/ruby/2.1.0/fileutils.rb:1571:in `fu_each_src_dest'
from /Users/mac/.rbenv/versions/2.1.2/lib/ruby/2.1.0/fileutils.rb:399:in `cp'
from extconf.rb:83:in `block in <main>'
from extconf.rb:82:in `each'
from extconf.rb:82:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in /Users/work/cucumber-obat24/vendor/ruby/2.1.0/gems/debugger-1.6.8 for inspection.
Results logged to /Users/work/cucumber-obat24/vendor/ruby/2.1.0/extensions/x86_64-darwin-13/2.1.0-static/debugger-1.6.8/gem_make.out
An error occurred while installing debugger (1.6.8), and Bundler cannot continue.

Make sure that `gem install debugger -v '1.6.8'` succeeds before bundling.


Using debugger-linecache 1.2.0
/Users/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:73: warning: Insecure world writable dir /usr/local in PATH, mode 040777
Installing debugger2 1.0.0.beta2
Using rubyzip 1.1.0
Using ruby-ole
Using spreadsheet 0.9.6
Using roo 1.13.0
Using rspec-core 2.14.7
Using rspec-expectations 2.14.4
Using rspec-mocks 2.14.4
Using rspec 2.14.1
Using websocket 1.0.7
Using selenium-webdriver 2.38.0
Using tins 0.13.1
Using term-ansicolor 1.2.2
Using bundler 1.6.3
Your bundle is complete!
It was installed into ./vendor