<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="https://www.stress-free.co.nz"  xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>stressfree - rails</title>
 <link>https://www.stress-free.co.nz/tech/rails</link>
 <description></description>
 <language>en</language>
<item>
 <title>Rails, Apache2 and SUSE</title>
 <link>https://www.stress-free.co.nz/rails_apache2_and_suse</link>
 <description>
  &lt;div class=&quot;field-body&quot;&gt;
      &lt;p&gt;Getting Rails up and running on Apache2 on SUSE is takes a little work as at the moment Rails is not part of the the SUSE software updates network. This means you must build Rails (and Ruby if using SuSE &amp;lt; 9.3) and the FastCGI development kit from source.&lt;/p&gt;  &lt;p&gt;1. First off it you need Ruby 1.8.2 (or greater) to run Rails. If you have a version less than this you will need to compile and install Ruby from source.    &lt;br /&gt;Install GCC, make, the C devel, zlib and zlib-devel packages using Yast.    &lt;br /&gt;Download the latest version of Ruby from http://www.ruby-lang.org/    &lt;br /&gt;Untar the source file to /usr/local/src, compile and install (as root or sudo): &lt;/p&gt;  &lt;p class=&quot;codesnippet&quot;&gt;tar -xzf ruby-1.8.3.tar.gz    &lt;br /&gt;cd ruby-1.8.3    &lt;br /&gt;./configure    &lt;br /&gt;make    &lt;br /&gt;make test    &lt;br /&gt;make install &lt;/p&gt; Once completed this will set Ruby up on your system (by default into /usr/local/bin). Create a link in /usr/bin to ruby.  &lt;p class=&quot;codesnippet&quot;&gt;ln -s /usr/local/bin/ruby /usr/bin/ruby &lt;/p&gt; 2. Install gems (a ruby package manager). Download gems from http://rubyforge.org/projects/rubygems/  &lt;br /&gt;Untar the source code into /usr/local/src, compile and install (as root or sudo):  &lt;p class=&quot;codesnippet&quot;&gt;tar -xzf rubygems-0.8.11.tgz    &lt;br /&gt;cd rubygems-0.8.11    &lt;br /&gt;./configure    &lt;br /&gt;make    &lt;br /&gt;make install &lt;/p&gt; This will install gems into /usr/local/bin. Create a link in /usr/bin  &lt;p class=&quot;codesnippet&quot;&gt;ln -s /usr/local/bin/gem /usr/bin/gem &lt;/p&gt; 3. With ruby and gems installed install Rails:  &lt;p class=&quot;codesnippet&quot;&gt;gem install rails --include-dependencies &lt;/p&gt; &lt;p&gt;4. With Rails installed create a test project and test the Rails WebBrick server.&lt;/p&gt; &lt;p&gt;5. Using Yast install the mod_fastcgi package for integrating Rails into Apache2. &lt;/p&gt;  &lt;p&gt;6. From http://www.fastcgi.com/ download the FastCGI development package. Untar the source into /usr/local/src and compile: &lt;/p&gt;  &lt;p class=&quot;codesnippet&quot;&gt;tar -xzf fcgi-2.4.0.tar.gz    &lt;br /&gt;cd fcgi-2.4.0    &lt;br /&gt;./configure    &lt;br /&gt;make install &lt;/p&gt; 7. Now install the fcgi component for ruby using gem.  &lt;p class=&quot;codesnippet&quot;&gt;gem install fcgi -- --with-fcgi-dir=/usr/local/ &lt;/p&gt; 8. Edit /etc/sysconfig/apache2 and in the modules section add fastcgi to the list of modules loaded by Apache when it starts.  &lt;br /&gt;&lt;br /&gt;9. Create a new virtualhost in Apache for your Rails application. Use the following template as an example:  &lt;p class=&quot;codesnippet&quot;&gt;&amp;lt;VirtualHost *:80&amp;gt;    &lt;br /&gt;        ServerName rails.test.domain    &lt;br /&gt;        AddHandler fastcgi-script .fcgi    &lt;br /&gt;        AddHandler cgi-script .cgi    &lt;br /&gt;        DocumentRoot /srv/www/rails/RailsTestProject/public    &lt;br /&gt;        &amp;lt;Directory /srv/www/rails/RailsTestProject/public&amp;gt;    &lt;br /&gt;                RewriteEngine On    &lt;br /&gt;                RewriteRule ^$ index.html [QSA]    &lt;br /&gt;                RewriteRule ^([^.]+)$ $1.html [QSA]    &lt;br /&gt;                RewriteCond %{REQUEST_FILENAME} !-f    &lt;br /&gt;                RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]    &lt;br /&gt;                ErrorDocument 500 &quot;&amp;lt;h2&amp;gt;Application error&amp;lt;/h2&amp;gt;Rails application failed to start properly&quot;    &lt;br /&gt;                Options ExecCGI FollowSymLinks    &lt;br /&gt;                AllowOverride all    &lt;br /&gt;                Allow from all    &lt;br /&gt;           Order allow,deny    &lt;br /&gt;        &amp;lt;/Directory&amp;gt;    &lt;br /&gt;&amp;lt;/VirtualHost&amp;gt; &lt;/p&gt; 10. Restart Apache and test the virtual host. Hopefully fastcgi should be working with Rails to display your new application.  &lt;p&gt; &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;   &lt;/div&gt;

&lt;ul class=&quot;field-taxonomy-vocabulary-1&quot;&gt;

      &lt;li&gt;
      &lt;a href=&quot;/tech/linux&quot;&gt;linux&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/suse&quot;&gt;suse&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tutorials&quot;&gt;software tutorials&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/ruby&quot;&gt;ruby&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/apache&quot;&gt;apache&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/rails&quot;&gt;rails&lt;/a&gt;    &lt;/li&gt;
  
&lt;/ul&gt;
</description>
 <pubDate>Wed, 09 Nov 2005 05:14:43 +0000</pubDate>
 <dc:creator>David</dc:creator>
 <guid isPermaLink="false">163 at https://www.stress-free.co.nz</guid>
</item>
<item>
 <title>Ruby on Rails in OSX Tiger</title>
 <link>https://www.stress-free.co.nz/ruby_on_rails_in_osx_tiger</link>
 <description>
  &lt;div class=&quot;field-body&quot;&gt;
     At the moment I am learning Ruby on Rails (I must say it is very impressive). Unfortunately getting it setup in OSX Tiger was not as straightforward as one would hope.  &lt;br /&gt;Although Apple have included Ruby with Tiger there are a few things that do not work right.  &lt;br /&gt;For my own future reference (and for anyone else that is interested) this is how I got it working with MySQL correctly on OSX Tiger and MySQL&#039;s own OSX binaries.  &lt;br /&gt;&lt;br /&gt;Follow the install intructions found here:  &lt;br /&gt;&lt;a href=&quot;http://www.tonyarnold.com/articles/2005/08/10/rolling-with-ruby-on-rails-on-mac-os-x-tiger-for-beginners&quot;&gt;Rolling with Ruby on Rails on Mac OS X Tiger&lt;/a&gt;  &lt;br /&gt;&lt;br /&gt;Once installed open a Terminal window and enter the following:  &lt;p class=&quot;codesnippet&quot;&gt; sudo sh    &lt;br /&gt;(enter the admin password)    &lt;br /&gt;     &lt;br /&gt;curl -O rufy.com/fix-ruby-tiger.sh; sh fix-ruby-tiger.sh    &lt;br /&gt;     &lt;br /&gt;gem install mysql -- --with-mysql-lib=/usr/local/lib/mysql --with-mysql-include=/usr/local/include    &lt;br /&gt;     &lt;br /&gt;exit&lt;/p&gt;  &lt;p&gt;   This should fix any Ruby issues and compile a fully functional Ruby MySQL driver ready for you to use.&lt;/p&gt;    &lt;/div&gt;

&lt;ul class=&quot;field-taxonomy-vocabulary-1&quot;&gt;

      &lt;li&gt;
      &lt;a href=&quot;/tech/osx&quot;&gt;osx&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tutorials&quot;&gt;software tutorials&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/ruby&quot;&gt;ruby&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/rails&quot;&gt;rails&lt;/a&gt;    &lt;/li&gt;
  
&lt;/ul&gt;
</description>
 <pubDate>Thu, 03 Nov 2005 10:26:06 +0000</pubDate>
 <dc:creator>David</dc:creator>
 <guid isPermaLink="false">162 at https://www.stress-free.co.nz</guid>
</item>
<item>
 <title>Ruby on Rails 15 minute Intro video</title>
 <link>https://www.stress-free.co.nz/ruby_on_rails_15_minute_intro_video</link>
 <description>
  &lt;div class=&quot;field-body&quot;&gt;
    This introduction video for&lt;a href=&quot;http://www.rubyonrails.org/&quot; title=&quot;Ruby on Rails&quot;&gt; Ruby on Rails &lt;/a&gt;is very impressive. Even if you don&#039;t know anything about programming it comes across as being very easy. If you are used to programming in Java like me watching this made me very, very jealous....&lt;br /&gt;&lt;a href=&quot;http://www.rubyonrails.com/media/video/rails_take2_with_sound.mov?coral-no-serve&quot;&gt;&lt;br /&gt;Ruby on Rails 15 minute introduction video&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;/div&gt;

&lt;ul class=&quot;field-taxonomy-vocabulary-1&quot;&gt;

      &lt;li&gt;
      &lt;a href=&quot;/tech/ruby&quot;&gt;ruby&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/video&quot;&gt;video&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/rails&quot;&gt;rails&lt;/a&gt;    &lt;/li&gt;
  
&lt;/ul&gt;
</description>
 <pubDate>Mon, 10 Oct 2005 11:33:15 +0000</pubDate>
 <dc:creator>David</dc:creator>
 <guid isPermaLink="false">145 at https://www.stress-free.co.nz</guid>
</item>
</channel>
</rss>
