The Caboteria / Tech Web / TechNotes > ProgrammingNotes / RubyNotes (revision 8)
RVM is a nice tool that manages multiple installations of Ruby, JRuby, gems, etc. It's very useful if you're working on both Ruby and JRuby projects. http://rvm.beginrescueend.com/
Since RVM compiles each version of ruby locally you need to make sure that you've installed the -dev packages for the features that you want. Readline, for example: libreadline-dev on debian. http://rubyforge.org/tracker/index.php?func=detail&aid=23925&group_id=1900&atid=7436

Citrus is a fun parser generator for Ruby. It lets you mix small bits of Ruby code in with your parser grammar. http://mjijackson.com/citrus/

Invoking a method with a ampersand-parameter: http://blog.jayfields.com/2007/01/ruby-invoking-method-with.html

RVM

http://rvm.beginrescueend.com/ - RVM is the Ruby Version Manager. It's a nice solution to having multiple versions of Ruby and sets of Ruby gems installed

Debian - when I used RVM on Debian for the first time, I had to use RVM to install copies of zlib and openssl in RVM's tree. For some reason configure couldn't see the Debian's versions.
http://rvm.beginrescueend.com/packages/openssl/
http://rvm.beginrescueend.com/packages/zlib/

Debugging

http://bashdb.sourceforge.net/ruby-debug.html - ruby debugger user's guide
http://rubyforge.org/projects/ruby-debug/ - ruby debugger project page

You want to run Debugger.start as soon as you can (preferably at the top level) so the debugger can capture the full stack frame.

Rails Development

https://rails.lighthouseapp.com/projects/8994-ruby-on-rails - this is the "official" Rails bug tracking system. The Rails "trac" site appears to be obsolete although it has powerful Google-fu
http://rubyglasses.blogspot.com/2009/07/rails-gotchas-undefined-method-expects.html - you need to install the Mocha gem by hand
Also need to install sqlite3, libsqlite3-dev, and the sqlite3-ruby gem.
$ cd activerecord && rake test-sqlite3

http://michalf.me/blog:make-ruby-1-9-default-on-ubuntu-9-10-karmic-koala - HOWTO install Ruby 1.9 as the default on Ubuntu

Edit | Attach | Print version | History: r18 | r10 < r9 < r8 < r7 | Backlinks | Raw View | Raw edit | More topic actions...
Copyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding The Caboteria? Send feedback