<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Serbian Cafe &#187; Ruby/Rails</title>
	<atom:link href="http://serbiancafe.wordpress.com/category/rubyrails/feed/" rel="self" type="application/rss+xml" />
	<link>http://serbiancafe.wordpress.com</link>
	<description></description>
	<lastBuildDate>Fri, 16 Oct 2009 02:00:10 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language></language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='serbiancafe.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/feef390f15ee5deb77f2d95b019d7931?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Serbian Cafe &#187; Ruby/Rails</title>
		<link>http://serbiancafe.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://serbiancafe.wordpress.com/osd.xml" title="Serbian Cafe" />
		<item>
		<title>Installing Ruby 1.8.5 on Ubuntu</title>
		<link>http://serbiancafe.wordpress.com/2007/02/10/installing-ruby-185-on-ubuntu/</link>
		<comments>http://serbiancafe.wordpress.com/2007/02/10/installing-ruby-185-on-ubuntu/#comments</comments>
		<pubDate>Sun, 11 Feb 2007 04:32:35 +0000</pubDate>
		<dc:creator>serbiancafe</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ruby/Rails]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://serbiancafe.wordpress.com/2007/02/10/installing-ruby-185-on-ubuntu/</guid>
		<description><![CDATA[Great how-to is located at http://www.rubywizards.com/viewtopic.php?pid=19 Here&#8217;s the copy of it:
* Bring up the terminal, login as system root, and create temporary directory to store downloaded files.
[~/] su
[~/] mkdir local
[~/] cd local
* Download official source distribution. This will create a file named ruby-1.8.5.tar.gz in your local directory.
[~/local] wget ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.8.5.tar.gz
* Extract all the files from downloaded [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=serbiancafe.wordpress.com&blog=26819&post=19&subd=serbiancafe&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Great how-to is located at <a href="http://www.rubywizards.com/viewtopic.php?pid=19" title="http://www.rubywizards.com/viewtopic.php?pid=19">http://www.rubywizards.com/viewtopic.php?pid=19</a> Here&#8217;s the copy of it:</p>
<p>* Bring up the terminal, login as system root, and create temporary directory to store downloaded files.<br />
<span style="color:green;">[~/] su<br />
[~/] mkdir local<br />
[~/] cd local</span></p>
<p>* Download official source distribution. This will create a file named <span style="color:navy;">ruby-1.8.5.tar.gz</span> in your <span style="color:navy;">local</span> directory.<br />
<span style="color:green;">[~/local] wget <a href="ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.8.5.tar.gz">ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.8.5.tar.gz</a></span></p>
<p>* Extract all the files from downloaded archive. This will create <span style="color:navy;">local/ruby-1.8.5</span> subdirectory that stores extracted files.<br />
<span style="color:green;">[~/local] tar xvfz ruby-1.8.5.tar.gz</span></p>
<p>* Install GNU C++ compiler you&#8217;ll need to build Ruby from source.<br />
<span style="color:green;">[~/local] apt-get install build-essential</span></p>
<p>* Run configure utility to determine your system configuration.<br />
<span style="color:green;">[~/local] cd ruby-1.8.5<br />
[~/local/ruby-1.8.5] ./configure</span></p>
<p>* Run make command to compile and build Ruby.<br />
<span style="color:green;">[~/local/ruby-1.8.5] make</span></p>
<p>* Test newly built Ruby executable by running regression test suite. Upon successfull completion you&#8217;ll see a message like: &#8220;Finished in 44.904424 seconds. 1440 tests, 13585 assertions, 0 failures, 0 errors.&#8221;<br />
<span style="color:green;">[~/local/ruby-1.8.5] make test-all</span></p>
<p>* Install Ruby onto your system. This will move Ruby executable and utilities to <span style="color:navy;">/usr/local/bin</span> and standard Ruby libraries to <span style="color:navy;">/usr/local/lib/ruby</span>.<br />
<span style="color:green;">[~/local/ruby-1.8.5] make install</span></p>
<p>* Install Ruby documentation. This will compile Ruby documentation in format required for ri command.<br />
<span style="color:green;">[~/local/ruby-1.8.5] make install-doc</span></p>
<p>At this point the installation of Ruby 1.8.5 is complete. If you had previous version of Ruby installed in <span style="color:navy;">/usr/local/bin</span>, you should take two extra steps:</p>
<p>* Make sure <span style="color:navy;">/usr/local/bin</span> comes before <span style="color:navy;">/usr/bin</span> in your $PATH:<br />
<span style="color:green;">[~/local/ruby-1.8.5] echo $PATH<br />
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games</span></p>
<p>* Logout from your current terminal session and login again to reload hashed value of ruby:<br />
<span style="color:green;">[~/local/ruby-1.8.5] which ruby<br />
/usr/local/bin/ruby<br />
[~/local/ruby-1.8.5] ruby -v<br />
ruby 1.8.5 (2006-08-25) [i686-linux]</span></p>
<p>Mike Dvorkin, Ruby Wizards Admin<br />
<a href="http://www.rubywizards.com/">http://www.rubywizards.com</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/serbiancafe.wordpress.com/19/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/serbiancafe.wordpress.com/19/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/serbiancafe.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/serbiancafe.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/serbiancafe.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/serbiancafe.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/serbiancafe.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/serbiancafe.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/serbiancafe.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/serbiancafe.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/serbiancafe.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/serbiancafe.wordpress.com/19/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=serbiancafe.wordpress.com&blog=26819&post=19&subd=serbiancafe&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://serbiancafe.wordpress.com/2007/02/10/installing-ruby-185-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e80f91f962f901b1cf6473adbc1c543e?s=96&#38;d=identicon" medium="image">
			<media:title type="html">serbiancafe</media:title>
		</media:content>
	</item>
		<item>
		<title>Ruby tricks</title>
		<link>http://serbiancafe.wordpress.com/2006/10/11/ruby-tricks/</link>
		<comments>http://serbiancafe.wordpress.com/2006/10/11/ruby-tricks/#comments</comments>
		<pubDate>Wed, 11 Oct 2006 21:01:00 +0000</pubDate>
		<dc:creator>serbiancafe</dc:creator>
				<category><![CDATA[Ruby/Rails]]></category>

		<guid isPermaLink="false">http://serbiancafe.wordpress.com/2006/10/11/ruby-tricks/</guid>
		<description><![CDATA[A short little method that helps find methods up the class latter:
class Object
  def my_methods
    self.class.ancestors.each {&#124;anc&#124;
      puts "#{anc}:"
      p anc.instance_methods(false)
      puts
    }
  end
end
5.times.my_methods
It was copied from Stupid easy Ruby tricks
  [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=serbiancafe.wordpress.com&blog=26819&post=15&subd=serbiancafe&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>A short little method that helps find methods up the class latter:</p>
<pre>class Object
  def my_methods
    self.class.ancestors.each {|anc|
      puts "#{anc}:"
      p anc.instance_methods(false)
      puts
    }
  end
end</pre>
<pre>5.times.my_methods</pre>
<p>It was copied from <a href="http://blog.twifkak.com/articles/2006/06/26/stupid-easy-ruby-tricks">Stupid easy Ruby tricks</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/serbiancafe.wordpress.com/15/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/serbiancafe.wordpress.com/15/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/serbiancafe.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/serbiancafe.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/serbiancafe.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/serbiancafe.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/serbiancafe.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/serbiancafe.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/serbiancafe.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/serbiancafe.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/serbiancafe.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/serbiancafe.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=serbiancafe.wordpress.com&blog=26819&post=15&subd=serbiancafe&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://serbiancafe.wordpress.com/2006/10/11/ruby-tricks/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e80f91f962f901b1cf6473adbc1c543e?s=96&#38;d=identicon" medium="image">
			<media:title type="html">serbiancafe</media:title>
		</media:content>
	</item>
		<item>
		<title>lighttpd configuration files for multiple rails apps</title>
		<link>http://serbiancafe.wordpress.com/2005/12/05/lighttpd-configuration-files-for-multiple-rails-apps/</link>
		<comments>http://serbiancafe.wordpress.com/2005/12/05/lighttpd-configuration-files-for-multiple-rails-apps/#comments</comments>
		<pubDate>Mon, 05 Dec 2005 22:45:18 +0000</pubDate>
		<dc:creator>serbiancafe</dc:creator>
				<category><![CDATA[Lighttpd]]></category>
		<category><![CDATA[Ruby/Rails]]></category>

		<guid isPermaLink="false">http://serbiancafe.wordpress.com/2005/12/05/lighttpd-configuration-files-for-multiple-rails-apps/</guid>
		<description><![CDATA[lighttpd 1.4.8 supports multiple rails aps via &#8217;strip-request-uri&#8217;. Lighty guys wrote about it here.
&#8217;strip-request-uri&#8217; strips URI&#8217;s from returning html, which is great if you&#8217;re proxying your application through another server. In my case I run apache as a primary server. All my Ruby on rails applications are on lighttpd running on the same server, but [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=serbiancafe.wordpress.com&blog=26819&post=9&subd=serbiancafe&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>lighttpd 1.4.8 supports multiple rails aps via &#8217;strip-request-uri&#8217;. Lighty guys wrote about it <a href="http://blog.lighttpd.net/articles/2005/11/23/lighttpd-1-4-8-and-multiple-rails-apps">here</a>.</p>
<p>&#8217;strip-request-uri&#8217; strips URI&#8217;s from returning html, which is great if you&#8217;re proxying your application through another server. In my case I run apache as a primary server. All my Ruby on rails applications are on lighttpd running on the same server, but higher port, 8888.</p>
<p>One of the domains on the primary server, <a href="http://www.metak.com">metak.com</a>, runs my ajaxed Serbian..English dictionary application. For usability purposes I want this domain to operate in &#8220;/&#8221;, but my true location on lighty server is &#8220;/lat/recnik/&#8221;. &#8217;strip-request-uri&#8217; does exactly what&#8217;s needed to fix this. Not just that it allows you to have multiple apps, but it gets rid of this &#8220;/lat/recnik/&#8221; path from resulting html.</p>
<p>Another way of getting multiple apps to work was brought up in the comments of lighty&#8217;s post. It works by adding code in rails environment.rb file:<br />
ActionController::AbstractRequest.relative_url_root = &#8220;/lat/recnik&#8221;</p>
<p>This sure works, but the resulting html includes absolute uri&#8217;s &#8220;/lat/recnik/&#8230;.&#8221;, so when you access it through the proxy it points to &#8220;/lat/recnik&#8221; directory which doesn&#8217;t exist on the primary server.</p>
<p>This method sure works better if you&#8217;re running lighty as a primary server :)<br />
Finally, here&#8217;s my config file:</p>
<pre># lighttpd configuration file
#
# use a it as base for lighttpd 1.0.0 and above
#
# $Id: lighttpd.conf,v 1.7 2004/11/03 22:26:05 weigon Exp $

############ Options you really have to take care of ####################

## modules to load
server.modules              = ("mod_rewrite", "mod_alias", "mod_access", "mod_status", "mod_fastcgi", "mod_accesslog" )

## a static document-root, for virtual-hosting take look at the
## server.virtual-* options
server.document-root        = "/www/site/"

## where to send error-messages to
server.errorlog             = "/www/log/error.log"

# files to check for if .../ is requested
index-file.names            = ( "index.html", "index.htm", "default.htm" )

# mimetype mapping
mimetype.assign             = (
".pdf"          =&gt;      "application/pdf",
<strike><em>[.... lots of boring lines here. Copy them from your original config file! ]</em></strike>
".tar.bz2"      =&gt;      "application/x-bzip-compressed-tar"
)

## be nice and keep it at lighttpd
server.tag                 = "lighttpd | SerbianCafe"

#### accesslog module
accesslog.filename          = "/www/log/access.log"

## deny access the file-extensions
url.access-deny             = ( "~", ".inc" )

$HTTP["url"] =~ ".pdf$" {
server.range-requests = "disable"
}

# which extensions should not be handle via static-file transfer
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

######### Options that are good to be but not neccesary to be changed #######
## bind to port (default: 80)
# Use high ports unless you want to run the web server as root
server.port                = 8888

## bind to localhost (default: all interfaces)
#server.bind                = "serbiancafe.com"

## to help the rc.scripts
server.pid-file            = "/www/run/lighttpd.pid"

#### status module
status.status-url          = "/server-status"

$HTTP["url"] =~ "^/lat/recnik/" {
server.document-root = "/www/site/lat/recnik/public/"
alias.url = ( "/lat/recnik/" =&gt; "/www/site/lat/recnik/public/" )
server.error-handler-404 = "/lat/recnik/dispatch.fcgi"
fastcgi.server = ( "/lat/recnik/dispatch.fcgi" =&gt;
(( "socket" =&gt; "/www/tmp/recnik.socket" ,
"bin-path" =&gt;  "/www/site/lat/recnik/public/dispatch.fcgi",
"bin-environment" =&gt; ( "RAILS_ENV" =&gt; "development" ),
"strip-request-uri" =&gt; "/lat/recnik"
)))
}

$HTTP["url"] =~ "^/typo/" {
server.document-root = "/www/railsapps/typo/public/"
alias.url = ( "/typo/" =&gt; "/www/railsapps/typo/public/" )
server.error-handler-404 = "/typo/dispatch.fcgi"
fastcgi.server = ( "/typo/dispatch.fcgi" =&gt;
(( "socket" =&gt; "/www/tmp/typo.socket" ,
"bin-path" =&gt;  "/www/railsapps/typo/public/dispatch.fcgi",
"bin-environment" =&gt; ( "RAILS_ENV" =&gt; "development" ),
"strip-request-uri" =&gt; "/typo"
)))
}

### only root can use these options
#
# chroot() to directory (default: no chroot() )
#server.chroot              = "/"

## change uid to  (default: don't care)
server.username            = "wwwrun"

## change uid to  (default: don't care)
server.groupname           = "wwwrun"

#### compress module
#compress.cache-dir         = "/tmp/lighttpd/cache/compress/"
#compress.filetype          = ("text/plain", "text/html")</pre>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/serbiancafe.wordpress.com/9/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/serbiancafe.wordpress.com/9/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/serbiancafe.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/serbiancafe.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/serbiancafe.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/serbiancafe.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/serbiancafe.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/serbiancafe.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/serbiancafe.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/serbiancafe.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/serbiancafe.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/serbiancafe.wordpress.com/9/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=serbiancafe.wordpress.com&blog=26819&post=9&subd=serbiancafe&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://serbiancafe.wordpress.com/2005/12/05/lighttpd-configuration-files-for-multiple-rails-apps/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e80f91f962f901b1cf6473adbc1c543e?s=96&#38;d=identicon" medium="image">
			<media:title type="html">serbiancafe</media:title>
		</media:content>
	</item>
	</channel>
</rss>