Ruby Tips: Difference between revisions
No edit summary |
|||
Line 1: | Line 1: | ||
== Ruby gems on Cygwin == | == Ruby gems on Cygwin == | ||
aka how to fix ''ruby: no such file to load -- ubygem (LoadError)'' | aka how to fix ''ruby: no such file to load -- ubygem (LoadError)'' or ''/usr/bin/ruby: no such file to load -- ubygems (LoadError)'' | ||
< | <geshi lang="bash"> | ||
$ unset RUBYOPT | $ unset RUBYOPT | ||
$ cd /tmp/ | $ cd /tmp/ | ||
Line 8: | Line 8: | ||
$ cd rubygems-0.9.4 | $ cd rubygems-0.9.4 | ||
$ ruby setup.rb | $ ruby setup.rb | ||
</ | </geshi> | ||
== [[Ruby Yaml to Enum]] == | == [[Ruby Yaml to Enum]] == |
Revision as of 02:19, 27 July 2007
Ruby gems on Cygwin
aka how to fix ruby: no such file to load -- ubygem (LoadError) or /usr/bin/ruby: no such file to load -- ubygems (LoadError) <geshi lang="bash"> $ unset RUBYOPT $ cd /tmp/ $ wget http://rubyforge.org/frs/download.php/20989/rubygems-0.9.4.tgz $ tar -zxf rubygems-0.9.4.tgz $ cd rubygems-0.9.4 $ ruby setup.rb </geshi>
Ruby Yaml to Enum
Generate Java 1.5 enums from a YAML file
Ruby detab
A script for removing tabs from source files
Ruby Sybase Solaris
Error Messages
irb
Setup tab completion and history here: http://wiki.rubygarden.org/Ruby/page/show/Irb/TipsAndTricks
Ruby Sybase Install
Escape invalid XML characters.
This is useful for running stuff through before posting it to the wiki.
echo "<a href=\"foo\">" | ruby -pe 'gsub!(/\&/, "&"); gsub!(/"/, """); gsub!(/</, "<"); gsub!(/>/, ">"); ' <a href="foo">