Skip to content
Menu
Poppy Ramblings Poppy Ramblings
  • About
Poppy Ramblings Poppy Ramblings

Tag: ruby

Installing therubyracer on Mac OS X 10.8 (Mountain Lion)

Posted on 2014-02-202020-04-12 by herbcso

This worked for me on 2014-02-20 after MUCH searching! brew tap homebrew/dupes brew install apple-gcc42 export CC=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 export CXX=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/g++-4.2 export CPP=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/cpp-4.2 sudo mv /usr/bin/g++ /usr/bin/g++_apple sudo ln -sf /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/g++-4.2 /usr/bin/g++ gem uninstall libv8 gem install therubyracer -v=0.11.4 sudo mv /usr/bin/g++_apple /usr/bin/g++ See also http://stackoverflow.com/a/21453272/120818

+

Switching from Rails’ standard testing to RSpec

Posted on 2013-10-172025-01-13 by herbcso

I’m writing a little mini Rails app (my first one) and I’ve been working with RSpec for other Ruby scripts I’ve been doing so far. However, in my ignorance I did not realize that rails new <app>  would generate the standard Rails tests (well, duh! ;] ). So now I’d like to switch to RSpec. Here…

+

Language Awareness – Ruby

Posted on 2013-06-162020-04-12 by herbcso

Something to be aware of when dealing with Ruby that the core docs don’t really document clearly enough: explicit vs. implicit conversions. Ruby provides functions like to_i and to_int that at first blush seem to do exactly the same thing. Yet, try to do something like “42”.to_i and you get back the natural-seeming 42 as…

+

Ruby: debugging a live process

Posted on 2013-04-182025-01-13 by herbcso

You can attach GDB to a Ruby process and get all sorts of information. Call with gdb /path/to/ruby <PID>, then running call rb_backtrace() from within gdb will get you a stack trace and you can raise exceptions with call rb_raise(rb_eException, “Testing…”). Neat trick, see here for the original source. I should add that in Ruby…

+

Parse Garmin TCX files

Posted on 2012-04-282025-01-13 by herbcso

So I was looking at my Vibram FiveFingers Bikila LS shoes and noticed that they started to wear a fair bit on the soles. I then got curious as to how many miles I had put on them. I also have a Garmin Forerunner 305 that I wear on every run, so I figured this…

+

Recent Posts

  • Shoutout for a nifty blog
  • Quick screenshots in Python
  • Getting IP address on very limited Docker containers
  • CIFS mount input/output error -5 with reading SOME directories
  • Avoid collisions in ~/bin

Recent Comments

  • herbcso on Debugging bash functions
  • herbcso on Everything you (n?)ever wanted to know about Unicode
  • herbcso on SpongeBob SquarePants in Buckaroo Banzai!?
  • mcshankins on SpongeBob SquarePants in Buckaroo Banzai!?
  • herbcso on PHP ZendDebugger and WAMP

Tags

ag AJAX bash blog cifs command-line cool debugging disk diun download firefox fix frameworks gdb homeassistant javascript packaging php plex portainer proxmox python ruby running samba search shoes silliness space SquarePants tcx therubyracer tips tricks tv unicode unix useful v8 WAMP weird windows xdebug zend

Archives

  • September 2024
  • January 2024
  • August 2023
  • September 2022
  • June 2022
  • March 2022
  • January 2022
  • May 2019
  • March 2019
  • April 2014
  • February 2014
  • October 2013
  • June 2013
  • April 2013
  • December 2012
  • November 2012
  • June 2012
  • April 2012
  • September 2011
  • October 2010
  • September 2010
  • August 2010
  • June 2010
  • May 2010
  • April 2010
  • October 2009
  • August 2008
  • June 2008
  • April 2008

Categories

  • android
  • browsers
  • coding
  • homelab
  • random nifty stuff
  • silly
  • site updates
  • Uncategorized

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
©2025 Poppy Ramblings | Powered by Superb Themes