<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>marcin ciszak's blog - ~/</title>
  <id>tag:www.marcinciszak.com,2008:mephisto/</id>
  <generator uri="http://mephistoblog.com" version="0.8.0">Mephisto Drax</generator>
  <link href="http://www.marcinciszak.com/feed/atom.xml" rel="self" type="application/atom+xml"/>
  <link href="http://www.marcinciszak.com/" rel="alternate" type="text/html"/>
  <updated>2008-07-27T19:12:14Z</updated>
  <entry xml:base="http://www.marcinciszak.com/">
    <author>
      <name>marcin</name>
    </author>
    <id>tag:www.marcinciszak.com,2008-07-26:27</id>
    <published>2008-07-26T21:07:00Z</published>
    <updated>2008-07-27T19:12:14Z</updated>
    <category term="/development"/>
    <category term="/rails"/>
    <category term="/ruby"/>
    <category term="/var/MacOSX"/>
    <category term="apache"/>
    <category term="development"/>
    <category term="mac os x"/>
    <category term="passenger"/>
    <category term="phusion"/>
    <category term="rails"/>
    <category term="ruby"/>
    <category term="ruby enterprise edition"/>
    <link href="http://www.marcinciszak.com/2008/7/26/ruby-enterprise-edition" rel="alternate" type="text/html"/>
    <title>Ruby Enterprise Edition - Mac OS X problem</title>
<content type="html">
            &lt;p&gt;Last weekend I decide to play a bit with &lt;a href=&quot;http://www.rubyenterpriseedition.com/&quot;&gt;Ruby Enterprise Edition&lt;/a&gt; to do some performance testing  and especially memory footprint. The installation process of &lt;a href=&quot;http://www.rubyenterpriseedition.com&quot;&gt;&lt;span class=&quot;caps&quot;&gt;REE&lt;/span&gt;&lt;/a&gt; went as smooth as it could &#8211; personally I&#8217;m a big fun of the installers which guide user through the installation giving all the hints on the spot (well done guys!).
After installation had finished I just couldn&#8217;t wait any longer to bind it with &lt;a href=&quot;http://www.modrails.com&quot;&gt;Phusion Passenger&lt;/a&gt; and see it in action. Also, as my mod_rails installation got a bit old (1.0.5) I decided to update it to the newest available version (currently 2.0.2). &lt;span class=&quot;caps&quot;&gt;NOTE&lt;/span&gt;: if you upgrade from mod_rails 1.0.5 to 2.0.2 you need to change your Apache configuration file:&lt;/p&gt;


	&lt;p&gt;- &lt;strong&gt;RailsRuby&lt;/strong&gt; directive is now called &lt;strong&gt;PassengerRuby&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;- &lt;strong&gt;RailsSpawnServer&lt;/strong&gt; is now obsolete and you should use &lt;strong&gt;PassengerRoot&lt;/strong&gt; instead.&lt;/p&gt;


	&lt;p&gt;I changed my httpd.conf file accordingly:&lt;/p&gt;


	&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;PREVIOUS CONFIGURATION FOR PASSENGER 1&lt;/span&gt;.0.5 &lt;span class=&quot;caps&quot;&gt;AND REGULAR RUBY 1&lt;/span&gt;.8.6&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;#LoadModule passenger_module /Library/Ruby/Gems/1.8/gems/passenger-1.0.5/ext/apache2/mod_passenger.so
#RailsSpawnServer /Library/Ruby/Gems/1.8/gems/passenger-1.0.5/bin/passenger-spawn-server
#RailsRuby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;NEW CONFIGURATION FOR PASSENGER 2&lt;/span&gt;.0.2 &lt;span class=&quot;caps&quot;&gt;AND RUBY ENTERPRISE EDITION&lt;/span&gt;&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;LoadModule passenger_module /Library/Ruby/Gems/1.8/gems/passenger-2.0.2/ext/apache2/mod_passenger.so
PassengerRoot /Library/Ruby/Gems/1.8/gems/passenger-2.0.2
PassengerRuby /private/opt/ruby-enterprise-1.8.6-20080709/bin/ruby&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Note that PassengerRuby path leads to the Ruby Enterprise Edition installation folder.&lt;/p&gt;


	&lt;p&gt;After configuration change all you need to do is to restart your Apache, launch your application and benefit from lower memory footprint. In the end I was quite disappointed when I saw this error messages in Apache&#8217;s error_log file:&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;[Sat Jul 26 19:33:22 2008] [notice] Apache/2.2.6 (Unix) DAV/2 PHP/5.2.5 Phusion_Passenger/2.0.2 configured -- resuming normal operations
/Library/Ruby/Gems/1.8/gems/passenger-2.0.2/ext/passenger/native_support.bundle: [BUG] Bus Error
ruby 1.8.6 (2008-03-03) [i686-darwin9.2.2]

[Sat Jul 26 19:33:52 2008] [error] [client ::1] *** Unexpected error in Passenger: Cannot spawn application '/Users/xyz/Sites/my_rails_app': The spawn server has exited unexpectedly.&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;I&#8217;m not sure if this is problem specific to Mac &lt;span class=&quot;caps&quot;&gt;OS X&lt;/span&gt; but noticed a few similar issues reported on the internet. Hoping that issue will be fixed very soon. Once it happens I&#8217;m going to give it another go and follow with some updates. Stay tuned!&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.marcinciszak.com/">
    <author>
      <name>marcin</name>
    </author>
    <id>tag:www.marcinciszak.com,2008-05-24:20</id>
    <published>2008-05-24T11:15:00Z</published>
    <updated>2008-07-26T15:33:27Z</updated>
    <category term="/development"/>
    <category term="/rails"/>
    <category term="/ruby"/>
    <category term="/var/MacOSX"/>
    <category term="deployment"/>
    <category term="mod_rails"/>
    <category term="passenger"/>
    <category term="phusion"/>
    <category term="rails"/>
    <category term="ruby"/>
    <link href="http://www.marcinciszak.com/2008/5/24/phusion-passenger-a-k-a-mod_rails" rel="alternate" type="text/html"/>
    <title>Phusion Passenger a.k.a mod_rails</title>
<content type="html">
            &lt;p&gt;As deployment of even very simple web &lt;a href=&quot;http://rubyonrails.com&quot;&gt;Rails&lt;/a&gt; apps was usually a pain (well, most of the cases) I decided to give &lt;a href=&quot;http://modrails.com&quot;&gt;mod_rails&lt;/a&gt; a go. The installation was a breeze as mod_rails installer guides you through the process nicely. Installation itself is as easy as that :&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;gem install passenger&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Once your gem is installed run the following command (as root, otherwise you will get some &#8220;permission denied&#8221; errors)&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;passenger-install-apache2-module&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Important note: In order to make Apache use your new shiny mod_rails you need to specifically modify its configuration by adding the following lines to your httpd.conf (NOTE: please change the paths accordingly!)&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;LoadModule passenger_module /Path/To/Gems/1.8/gems/passenger-1.0.5/ext/apache2/mod_passenger.so
RailsSpawnServer /Path/To/Gems/1.8/gems/passenger-1.0.5/bin/passenger-spawn-server
RailsRuby /Path/To/bin/ruby&lt;/code&gt;&lt;/pre&gt; 

	&lt;p&gt;After that all you need to do to make your app working is to modify / create virtual host definition:&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&amp;lt;VirtualHost *:80&amp;gt;
      ServerName www.yourhost.com
      DocumentRoot /path/to/your/rails_app/public
&amp;lt;/VirtualHost&amp;gt;&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Now you are good to go ahead and restart your apache.&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;apachectl configtest
apachectl restart&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;For the test purposes I created a fresh rails app and start apache to serve it. The default page popped in on the screen which I took as a good sign ;) Next, I had created a simple controller with one action in it and then tried to reload the browser. The changes I made in the application weren&#8217;t reflected in the browser (the old version of the app was still in memory). Like in the case of standard setup (Webrick/Mongrel/etc.) with mod_rails you need to restart the application server in order for changes to take effect. One interesting thing here is that there is no command to be invoked from the command line to do it. Instead one need to create restart.txt file in application&#8217;s /tmp folder and then reload web browser pointing to your application.&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;touch /path/to/your/rails_app/tmp/restart.txt&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Passenger loads your application into memory and keeps it there until one of the following events occur:&lt;/p&gt;


	&lt;p&gt;1. restart.txt has been created in application&#8217;s /tmp folder and web browser point to your app has been refreshed&lt;/p&gt;


2. Application has been idle for some time (the default it 120sec.) [see snippet below&#8230;]
&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;[27:Application.h:264] Application 0x1a2ceb0: created.
[27:StandardApplicationPool.h:249] Cleaning idle app /path_to_your_app (PID 31918)
[27:Application.h:274] Application 0x1a2ceb0: destroyed.&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;If you have any issues with your deployment resulting in your app not being served / throwing errors go ahead and analyze your apache error_log (usually /var/log/apache2/error_log) and your application&#8217;s production log. It will give you some clues where things went wrong.&lt;/p&gt;


	&lt;p&gt;Also, mod_rails comes with pretty &lt;a href=&quot;http://modrails.com/documentation/Users%20guide.html&quot;&gt;good documentation which can be found here&lt;/a&gt;.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.marcinciszak.com/">
    <author>
      <name>marcin</name>
    </author>
    <id>tag:www.marcinciszak.com,2008-05-13:5</id>
    <published>2008-05-13T21:05:00Z</published>
    <updated>2008-05-13T21:09:23Z</updated>
    <category term="/var/iPhone"/>
    <category term="/var/MacOSX"/>
    <category term="/var/misc"/>
    <category term="apps"/>
    <category term="iphone"/>
    <link href="http://www.marcinciszak.com/2008/5/13/my-top-10-apps-for-iphone" rel="alternate" type="text/html"/>
    <title>My Top 10 apps for iPhone</title>
<content type="html">
            &lt;p&gt;In no particular order, my current top 10 apps for iPhone:&lt;/p&gt;


	&lt;ol&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.iphonic.tv/2008/04/twinkle_iphone_twitter_client.html&quot;&gt;Twinkle&lt;/a&gt; &#8211; Mobile &lt;a href=&quot;http://twitter.com&quot;&gt;Twitter&lt;/a&gt; client with location and pictures attachments for your iPhone.&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;http://dev.c99.org/MobileScrobbler/&quot;&gt;MobileScrobbler&lt;/a&gt; &#8211; Last.fm client for Apple iPhone and iPod Touch.&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;http://www.appleiphoneschool.com/2008/04/15/mobile-flickr/&quot;&gt;Flickr&lt;/a&gt; &#8211; Mobile Flickr app for iPhone&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;http://ericasadun.com/ftp/Applications/VoiceNotes/&quot;&gt;VNotes&lt;/a&gt; &#8211; Voice Recorder for iPhone &lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;http://code.google.com/p/iphonelockbox/&quot;&gt;Lockbox&lt;/a&gt; &#8211; Password &#38; secret information storage program for the iPhone&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;http://code.google.com/p/mobileterminal/&quot;&gt;Terminal&lt;/a&gt; &#8211; A terminal emulator application for the iPhone&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;http://mxweas.com/blog/&quot;&gt;MxTube&lt;/a&gt; &#8211; Mobile YouTube with download feature. Sweat!&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;http://www.fring.com/iphone/&quot;&gt;Fring&lt;/a&gt; &#8211; &#8220;fring™ is a mobile internet service &#38; community that enables you to access &#38; interact with your social networks on-the-go, make free calls and live chat with all your fring, Skype®, &lt;span class=&quot;caps&quot;&gt;MSN&lt;/span&gt;® Messenger, Google Talk™, &lt;span class=&quot;caps&quot;&gt;ICQ&lt;/span&gt;, SIP, Twitter, Yahoo!™ and &lt;span class=&quot;caps&quot;&gt;AIM&lt;/span&gt;®* friends using your handset’s internet connection rather than costly cellular airtime minutes.&#8221; &lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;http://sketchesapp.com/&quot;&gt;Sketches&lt;/a&gt; &#8211; touch screen drawing for your iPhone / iPod Touch&lt;/li&gt;
		&lt;li&gt;&lt;a href=&quot;http://www.robota.nl/products/iPhone%20SysInfo.html&quot;&gt;SysInfo&lt;/a&gt; &#8211;  show all processes running on your iPhone.&lt;/li&gt;
	&lt;/ol&gt;
          </content>  </entry>
  <entry xml:base="http://www.marcinciszak.com/">
    <author>
      <name>marcin</name>
    </author>
    <id>tag:www.marcinciszak.com,2008-05-01:4</id>
    <published>2008-05-01T19:48:00Z</published>
    <updated>2008-05-13T21:17:29Z</updated>
    <category term="/development"/>
    <category term="/ruby"/>
    <category term="/var/conferences"/>
    <category term="conf"/>
    <category term="conference"/>
    <category term="development"/>
    <category term="google"/>
    <link href="http://www.marcinciszak.com/2008/5/1/google-i-o-san-francisco" rel="alternate" type="text/html"/>
    <title>Google I/O, San Francisco</title>
<content type="html">
            &lt;p&gt;It&#8217;s stating the obvious that the company I&#8217;m working for is the coolest company in the world :) From time to time I&#8217;m being sent over to the various conferences like &lt;a href=&quot;http://www.futureofwebapps.com&quot;&gt;Future Of the Web Apps&lt;/a&gt;, &lt;a href=&quot;http://2007.dconstruct.org&quot;&gt;dConstruct&lt;/a&gt;, &lt;a href=&quot;http://europe.railsconf.org&quot;&gt;RailsConf&lt;/a&gt;, etc&#8230; This time I got lucky and am going to San Francisco to take part in &lt;a href=&quot;http://code.google.com/events/io/&quot;&gt;Google I/O&lt;/a&gt;. The agenda looks really good! Am especially interested in GoogleAppEngine, the new cool way of deploying your web apps using Google&#8217;s super fast and scalable infrastructure, &lt;strong&gt;for free!&lt;/strong&gt; GoogleGears, APIs, OpenSocial and other sessions seem to be very promising, too. Can&#8217;t wait&#8230; Will follow up with the conference review when I&#8217;m there&#8230;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.marcinciszak.com/">
    <author>
      <name>marcin</name>
    </author>
    <id>tag:www.marcinciszak.com,2008-04-30:3</id>
    <published>2008-04-30T19:26:00Z</published>
    <updated>2008-05-01T21:59:37Z</updated>
    <category term="/development"/>
    <category term="/ruby"/>
    <category term="dust"/>
    <category term="expectations"/>
    <category term="ruby"/>
    <category term="tests"/>
    <category term="unit"/>
    <link href="http://www.marcinciszak.com/2008/4/30/ruby-test-unit-frameworks" rel="alternate" type="text/html"/>
    <title>Ruby unit testing frameworks</title>
<content type="html">
            &lt;p&gt;Although I&#8217;m still pretty new in the Ruby world I&#8217;ve had chance and opportunity to work with people I could learn a lot from&#8230; Today I&#8217;ve spent some time with &lt;a href=&quot;http://jayfields.com&quot;&gt;Jay Fields&lt;/a&gt; talking about testing frameworks for Ruby. I was truly amazed by the stuff he showed to me, namely &lt;a href=&quot;http://rubyforge.org/projects/dust/&quot;&gt;dust&lt;/a&gt; and &lt;a href=&quot;http://rubyforge.org/projects/expectations/&quot;&gt;expectations&lt;/a&gt; lightweight unit testing frameworks. The latter has eventually surpassed the &#8220;dust&#8221;, however, in my opinion it&#8217;s good to have plenty of options to choose from. Personally I&#8217;m going to give a go to both of them in a project am working on currently. I&#8217;m looking to post some updates soon.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.marcinciszak.com/">
    <author>
      <name>marcin</name>
    </author>
    <id>tag:www.marcinciszak.com,2008-04-19:2</id>
    <published>2008-04-19T19:41:00Z</published>
    <updated>2008-04-30T00:45:17Z</updated>
    <category term="/var/MacOSX"/>
    <category term="development"/>
    <category term="iphone"/>
    <link href="http://www.marcinciszak.com/2008/4/19/new-itoy" rel="alternate" type="text/html"/>
    <title>New iToy</title>
<content type="html">
            &lt;p&gt;After so many months of waiting and just a month or two before release of the 3G model I decided to buy an iPhone, well two iPhones. As am rather not keen on signing up for 18-month contract with &lt;span class=&quot;caps&quot;&gt;O2 I&lt;/span&gt; will either end up with this device holding papers on my desk or jailbreak it :) Finally I will have an opportunity to write and test some native apps for the Touch platform&#8230; Can&#8217;t wait!&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://www.marcinciszak.com/">
    <author>
      <name>marcin</name>
    </author>
    <id>tag:www.marcinciszak.com,2008-04-17:1</id>
    <published>2008-04-17T00:41:00Z</published>
    <updated>2008-07-26T15:56:11Z</updated>
    <category term="/development"/>
    <category term="/ruby"/>
    <category term="/var/misc"/>
    <category term="blog"/>
    <category term="mephisto"/>
    <category term="rails"/>
    <category term="ruby"/>
    <link href="http://www.marcinciszak.com/2008/4/17/getting-mephisto-0-8-up-and-running" rel="alternate" type="text/html"/>
    <title>Getting Mephisto 0.8 up and running</title>
<content type="html">
            &lt;p&gt;I&#8217;ve spent some time recently trying to set up my brand new mephisto blog engine. Although mephisto is recognized as rather solid piece of software, sometimes you may face some issues. In my case I found the following error message in my production log :&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;LoadError (Expected /home/xyz/mephisto/app/models/asset.rb to define Asset):&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;In order to solve that issue follow these steps&lt;sup&gt;1&lt;/sup&gt; :&lt;/p&gt;


	&lt;p&gt;1. Find a place for ruby_inline to store its stuff, for example: &lt;span class=&quot;caps&quot;&gt;RAILS&lt;/span&gt;_ROOT/tmp.&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;mkdir tmp/.ruby_inline
chown nobody:nobody tmp/.ruby_inline
chmod 755 tmp/.ruby_inline&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;2. Tell ruby_inline what you did by adding the following line in config/environment.rb:&lt;/p&gt;


&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;ENV[‘INLINEDIR’] = File.join(File.dirname(FILE),”../tmp”)&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;3. Restart the server.&lt;/p&gt;


	&lt;p&gt;&lt;sup&gt;1&lt;/sup&gt; solution has been found at &lt;a href=&quot;http://beast.caboo.se/forums/2/topics/1064&quot;&gt;this blog&lt;/a&gt;&lt;/p&gt;
          </content>  </entry>
</feed>
